OSCR Wiki
oscrwiki_wiki
https://oscr.wiki/Main_Page
MediaWiki 1.39.2
first-letter
Media
Special
Talk
User
User talk
OSCR Wiki
OSCR Wiki talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
Module
Module talk
Translations
Translations talk
Main Page
0
1
1
2023-03-15T19:48:57Z
MediaWiki default
2
wikitext
text/x-wiki
<strong>MediaWiki has been installed.</strong>
Consult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User's Guide] for information on using the wiki software.
== Getting started ==
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ MediaWiki release mailing list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]
11cef88175cf81168a86e7c0327a5b2d7a1920f5
8
1
2023-03-15T20:49:00Z
Ancyker
1
wikitext
text/x-wiki
Welcome to the community wiki for the Open Source Cartridge Reader (OSCR)! This project represents a community-driven effort to provide an easy to build and easy to modify cartridge dumper. Its main purpose is to dump a video game's ROM and save file to an SD card without the need of a PC.
e985e2842e02c20bf113a3a723a603b7795ef41c
MediaWiki:Titleblacklist
8
2
2
2023-03-15T20:31:23Z
Ancyker
1
Created page with "# This is a disallowed titles list. Titles and usernames that match a regular expression here cannot be created. # Use "#" for comments. # This is case-insensitive by default \/.*"
wikitext
text/x-wiki
# This is a disallowed titles list. Titles and usernames that match a regular expression here cannot be created.
# Use "#" for comments.
# This is case-insensitive by default
\/.*
427c887af8cc2536871a3773e6c41487ccecc5bb
MediaWiki:Sidebar
8
3
3
2023-03-15T20:39:38Z
Ancyker
1
Created page with " * navigation ** mainpage|mainpage-description ** recentchanges-url|recentchanges ** randompage-url|randompage ** https://github.com/sanni/cartreader|GitHub ** helppage|help-mediawiki * SEARCH * TOOLBOX * LANGUAGES"
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** randompage-url|randompage
** https://github.com/sanni/cartreader|GitHub
** helppage|help-mediawiki
* SEARCH
* TOOLBOX
* LANGUAGES
ab4c492d2aa626237b3461e81030035ee64fd185
4
3
2023-03-15T20:40:26Z
Ancyker
1
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** randompage-url|randompage
** helppage|help-mediawiki
* Links
** https://github.com/sanni/cartreader|GitHub
* SEARCH
* TOOLBOX
* LANGUAGES
31f05c70a4bbbbd590ece71b85b7fac66fcf9fb9
5
4
2023-03-15T20:40:37Z
Ancyker
1
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** randompage-url|randompage
** helppage|help-mediawiki
* External Links
** https://github.com/sanni/cartreader|GitHub
* SEARCH
* TOOLBOX
* LANGUAGES
fcb1c6705c99ab44436c71afb05cb6effc90117d
6
5
2023-03-15T20:40:48Z
Ancyker
1
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** randompage-url|randompage
** helppage|help-mediawiki
* External Links
** https://github.com/sanni/cartreader|GitHub Project
* SEARCH
* TOOLBOX
* LANGUAGES
a9bbab8ecb9114ce0db25278329d1ca974b35911
7
6
2023-03-15T20:43:09Z
Ancyker
1
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** randompage-url|randompage
** helppage|help-mediawiki
* External Links
** https://github.com/sanni/cartreader|GitHub Project
** https://discord.gg/YVxv7BnzXt|Discord
* SEARCH
* TOOLBOX
* LANGUAGES
675b9f7fa8ad93620ac882ad042469233f687eb3
MediaWiki:Licenses
8
4
9
2023-03-15T21:00:06Z
Ancyker
1
Created page with "* Unknown_copyright|I don't know exactly * Free licenses: ** PD|PD: public domain ** CC-by-sa-4.0|Creative Commons Attribution ShareAlike 4.0 ** BSD-3-Clause|BSD-3-Clause license ** GFDL|GFDL: GNU Free Documentation License ** GPL|GPL: GNU General Public License ** LGPL|LGPL: GNU Lesser General Public License"
wikitext
text/x-wiki
* Unknown_copyright|I don't know exactly
* Free licenses:
** PD|PD: public domain
** CC-by-sa-4.0|Creative Commons Attribution ShareAlike 4.0
** BSD-3-Clause|BSD-3-Clause license
** GFDL|GFDL: GNU Free Documentation License
** GPL|GPL: GNU General Public License
** LGPL|LGPL: GNU Lesser General Public License
50e03d5b3faa9ed2e49ed54a45c0c2f9fa068b6c
File:Oscr-render.png
6
5
10
2023-03-15T21:00:57Z
Ancyker
1
Rendered image of OSCR HW5 obtained from the project's GitHub page.
wikitext
text/x-wiki
== Summary ==
Rendered image of OSCR HW5 obtained from the project's GitHub page.
== Licensing ==
{{GPL}}
e75c11b60976843d38ecd4bc468430f58aefbf62
Module:Message box
828
6
11
2023-03-15T21:17:10Z
Ancyker
1
Created page with "-- This is a meta-module for producing message box templates, including -- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}. -- Load necessary modules. require('strict') local getArgs local yesno = require('Module:Yesno') -- Get a language object for formatDate and ucfirst. local lang = mw.language.getContentLanguage() -- Define constants local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = '..."
Scribunto
text/plain
-- This is a meta-module for producing message box templates, including
-- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}.
-- Load necessary modules.
require('strict')
local getArgs
local yesno = require('Module:Yesno')
-- Get a language object for formatDate and ucfirst.
local lang = mw.language.getContentLanguage()
-- Define constants
local CONFIG_MODULE = 'Module:Message box/configuration'
local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'}
local TEMPLATE_STYLES = 'Module:Message box/%s.css'
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function getTitleObject(...)
-- Get the title object, passing the function through pcall
-- in case we are over the expensive function count limit.
local success, title = pcall(mw.title.new, ...)
if success then
return title
end
end
local function union(t1, t2)
-- Returns the union of two arrays.
local vals = {}
for i, v in ipairs(t1) do
vals[v] = true
end
for i, v in ipairs(t2) do
vals[v] = true
end
local ret = {}
for k in pairs(vals) do
table.insert(ret, k)
end
table.sort(ret)
return ret
end
local function getArgNums(args, prefix)
local nums = {}
for k, v in pairs(args) do
local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$')
if num then
table.insert(nums, tonumber(num))
end
end
table.sort(nums)
return nums
end
--------------------------------------------------------------------------------
-- Box class definition
--------------------------------------------------------------------------------
local MessageBox = {}
MessageBox.__index = MessageBox
function MessageBox.new(boxType, args, cfg)
args = args or {}
local obj = {}
obj.boxType = boxType
-- Set the title object and the namespace.
obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle()
-- Set the config for our box type.
obj.cfg = cfg[boxType]
if not obj.cfg then
local ns = obj.title.namespace
-- boxType is "mbox" or invalid input
if args.demospace and args.demospace ~= '' then
-- implement demospace parameter of mbox
local demospace = string.lower(args.demospace)
if DEMOSPACES[demospace] then
-- use template from DEMOSPACES
obj.cfg = cfg[DEMOSPACES[demospace]]
obj.boxType = DEMOSPACES[demospace]
elseif string.find( demospace, 'talk' ) then
-- demo as a talk page
obj.cfg = cfg.tmbox
obj.boxType = 'tmbox'
else
-- default to ombox
obj.cfg = cfg.ombox
obj.boxType = 'ombox'
end
elseif ns == 0 then
obj.cfg = cfg.ambox -- main namespace
obj.boxType = 'ambox'
elseif ns == 6 then
obj.cfg = cfg.imbox -- file namespace
obj.boxType = 'imbox'
elseif ns == 14 then
obj.cfg = cfg.cmbox -- category namespace
obj.boxType = 'cmbox'
else
local nsTable = mw.site.namespaces[ns]
if nsTable and nsTable.isTalk then
obj.cfg = cfg.tmbox -- any talk namespace
obj.boxType = 'tmbox'
else
obj.cfg = cfg.ombox -- other namespaces or invalid input
obj.boxType = 'ombox'
end
end
end
-- Set the arguments, and remove all blank arguments except for the ones
-- listed in cfg.allowBlankParams.
do
local newArgs = {}
for k, v in pairs(args) do
if v ~= '' then
newArgs[k] = v
end
end
for i, param in ipairs(obj.cfg.allowBlankParams or {}) do
newArgs[param] = args[param]
end
obj.args = newArgs
end
-- Define internal data structure.
obj.categories = {}
obj.classes = {}
-- For lazy loading of [[Module:Category handler]].
obj.hasCategories = false
return setmetatable(obj, MessageBox)
end
function MessageBox:addCat(ns, cat, sort)
if not cat then
return nil
end
if sort then
cat = string.format('[[Category:%s|%s]]', cat, sort)
else
cat = string.format('[[Category:%s]]', cat)
end
self.hasCategories = true
self.categories[ns] = self.categories[ns] or {}
table.insert(self.categories[ns], cat)
end
function MessageBox:addClass(class)
if not class then
return nil
end
self.classes[class] = 1
end
function MessageBox:removeClass(class)
if not class then
return nil
end
self.classes[class] = nil
end
function MessageBox:setParameters()
local args = self.args
local cfg = self.cfg
-- Get type data.
self.type = args.type
local typeData = cfg.types[self.type]
self.invalidTypeError = cfg.showInvalidTypeError
and self.type
and not typeData
typeData = typeData or cfg.types[cfg.default]
self.typeClass = typeData.class
self.typeImage = typeData.image
-- Find if the box has been wrongly substituted.
self.isSubstituted = cfg.substCheck and args.subst == 'SUBST'
-- Find whether we are using a small message box.
self.isSmall = cfg.allowSmall and (
cfg.smallParam and args.small == cfg.smallParam
or not cfg.smallParam and yesno(args.small)
)
-- Add attributes, classes and styles.
self.id = args.id
self.name = args.name
for _, class in ipairs(cfg.classes or {}) do
self:addClass(class)
end
if self.name then
self:addClass('box-' .. string.gsub(self.name,' ','_'))
end
local plainlinks = yesno(args.plainlinks)
if plainlinks == true then
self:addClass('plainlinks')
elseif plainlinks == false then
self:removeClass('plainlinks')
end
if self.isSmall then
self:addClass(cfg.smallClass or 'mbox-small')
end
self:addClass(self.typeClass)
self:addClass(args.class)
self.style = args.style
self.attrs = args.attrs
-- Set text style.
self.textstyle = args.textstyle
-- Find if we are on the template page or not. This functionality is only
-- used if useCollapsibleTextFields is set, or if both cfg.templateCategory
-- and cfg.templateCategoryRequireName are set.
self.useCollapsibleTextFields = cfg.useCollapsibleTextFields
if self.useCollapsibleTextFields
or cfg.templateCategory
and cfg.templateCategoryRequireName
then
if self.name then
local templateName = mw.ustring.match(
self.name,
'^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$'
) or self.name
templateName = 'Template:' .. templateName
self.templateTitle = getTitleObject(templateName)
end
self.isTemplatePage = self.templateTitle
and mw.title.equals(self.title, self.templateTitle)
end
-- Process data for collapsible text fields. At the moment these are only
-- used in {{ambox}}.
if self.useCollapsibleTextFields then
-- Get the self.issue value.
if self.isSmall and args.smalltext then
self.issue = args.smalltext
else
local sect
if args.sect == '' then
sect = 'This ' .. (cfg.sectionDefault or 'page')
elseif type(args.sect) == 'string' then
sect = 'This ' .. args.sect
end
local issue = args.issue
issue = type(issue) == 'string' and issue ~= '' and issue or nil
local text = args.text
text = type(text) == 'string' and text or nil
local issues = {}
table.insert(issues, sect)
table.insert(issues, issue)
table.insert(issues, text)
self.issue = table.concat(issues, ' ')
end
-- Get the self.talk value.
local talk = args.talk
-- Show talk links on the template page or template subpages if the talk
-- parameter is blank.
if talk == ''
and self.templateTitle
and (
mw.title.equals(self.templateTitle, self.title)
or self.title:isSubpageOf(self.templateTitle)
)
then
talk = '#'
elseif talk == '' then
talk = nil
end
if talk then
-- If the talk value is a talk page, make a link to that page. Else
-- assume that it's a section heading, and make a link to the talk
-- page of the current page with that section heading.
local talkTitle = getTitleObject(talk)
local talkArgIsTalkPage = true
if not talkTitle or not talkTitle.isTalkPage then
talkArgIsTalkPage = false
talkTitle = getTitleObject(
self.title.text,
mw.site.namespaces[self.title.namespace].talk.id
)
end
if talkTitle and talkTitle.exists then
local talkText = 'Relevant discussion may be found on'
if talkArgIsTalkPage then
talkText = string.format(
'%s [[%s|%s]].',
talkText,
talk,
talkTitle.prefixedText
)
else
talkText = string.format(
'%s the [[%s#%s|talk page]].',
talkText,
talkTitle.prefixedText,
talk
)
end
self.talk = talkText
end
end
-- Get other values.
self.fix = args.fix ~= '' and args.fix or nil
local date
if args.date and args.date ~= '' then
date = args.date
elseif args.date == '' and self.isTemplatePage then
date = lang:formatDate('F Y')
end
if date then
self.date = string.format(" <small class='date-container'>''(<span class='date'>%s</span>)''</small>", date)
end
self.info = args.info
if yesno(args.removalnotice) then
self.removalNotice = cfg.removalNotice
end
end
-- Set the non-collapsible text field. At the moment this is used by all box
-- types other than ambox, and also by ambox when small=yes.
if self.isSmall then
self.text = args.smalltext or args.text
else
self.text = args.text
end
-- Set the below row.
self.below = cfg.below and args.below
-- General image settings.
self.imageCellDiv = not self.isSmall and cfg.imageCellDiv
self.imageEmptyCell = cfg.imageEmptyCell
if cfg.imageEmptyCellStyle then
self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px'
end
-- Left image settings.
local imageLeft = self.isSmall and args.smallimage or args.image
if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none'
or not cfg.imageCheckBlank and imageLeft ~= 'none'
then
self.imageLeft = imageLeft
if not imageLeft then
local imageSize = self.isSmall
and (cfg.imageSmallSize or '30x30px')
or '40x40px'
self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage
or 'Imbox notice.png', imageSize)
end
end
-- Right image settings.
local imageRight = self.isSmall and args.smallimageright or args.imageright
if not (cfg.imageRightNone and imageRight == 'none') then
self.imageRight = imageRight
end
end
function MessageBox:setMainspaceCategories()
local args = self.args
local cfg = self.cfg
if not cfg.allowMainspaceCategories then
return nil
end
local nums = {}
for _, prefix in ipairs{'cat', 'category', 'all'} do
args[prefix .. '1'] = args[prefix]
nums = union(nums, getArgNums(args, prefix))
end
-- The following is roughly equivalent to the old {{Ambox/category}}.
local date = args.date
date = type(date) == 'string' and date
local preposition = 'from'
for _, num in ipairs(nums) do
local mainCat = args['cat' .. tostring(num)]
or args['category' .. tostring(num)]
local allCat = args['all' .. tostring(num)]
mainCat = type(mainCat) == 'string' and mainCat
allCat = type(allCat) == 'string' and allCat
if mainCat and date and date ~= '' then
local catTitle = string.format('%s %s %s', mainCat, preposition, date)
self:addCat(0, catTitle)
catTitle = getTitleObject('Category:' .. catTitle)
if not catTitle or not catTitle.exists then
self:addCat(0, 'Articles with invalid date parameter in template')
end
elseif mainCat and (not date or date == '') then
self:addCat(0, mainCat)
end
if allCat then
self:addCat(0, allCat)
end
end
end
function MessageBox:setTemplateCategories()
local args = self.args
local cfg = self.cfg
-- Add template categories.
if cfg.templateCategory then
if cfg.templateCategoryRequireName then
if self.isTemplatePage then
self:addCat(10, cfg.templateCategory)
end
elseif not self.title.isSubpage then
self:addCat(10, cfg.templateCategory)
end
end
-- Add template error categories.
if cfg.templateErrorCategory then
local templateErrorCategory = cfg.templateErrorCategory
local templateCat, templateSort
if not self.name and not self.title.isSubpage then
templateCat = templateErrorCategory
elseif self.isTemplatePage then
local paramsToCheck = cfg.templateErrorParamsToCheck or {}
local count = 0
for i, param in ipairs(paramsToCheck) do
if not args[param] then
count = count + 1
end
end
if count > 0 then
templateCat = templateErrorCategory
templateSort = tostring(count)
end
if self.categoryNums and #self.categoryNums > 0 then
templateCat = templateErrorCategory
templateSort = 'C'
end
end
self:addCat(10, templateCat, templateSort)
end
end
function MessageBox:setAllNamespaceCategories()
-- Set categories for all namespaces.
if self.isSubstituted then
self:addCat('all', 'Pages with incorrectly substituted templates')
end
end
function MessageBox:setCategories()
if self.title.namespace == 0 then
self:setMainspaceCategories()
elseif self.title.namespace == 10 then
self:setTemplateCategories()
end
self:setAllNamespaceCategories()
end
function MessageBox:renderCategories()
if not self.hasCategories then
-- No categories added, no need to pass them to Category handler so,
-- if it was invoked, it would return the empty string.
-- So we shortcut and return the empty string.
return ""
end
-- Convert category tables to strings and pass them through
-- [[Module:Category handler]].
return require('Module:Category handler')._main{
main = table.concat(self.categories[0] or {}),
template = table.concat(self.categories[10] or {}),
all = table.concat(self.categories.all or {}),
nocat = self.args.nocat,
page = self.args.page
}
end
function MessageBox:export()
local root = mw.html.create()
-- Add the subst check error.
if self.isSubstituted and self.name then
root:tag('b')
:addClass('error')
:wikitext(string.format(
'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.',
mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}')
))
end
-- Add TemplateStyles
root:wikitext(mw.getCurrentFrame():extensionTag{
name = 'templatestyles',
args = { src = TEMPLATE_STYLES:format(self.boxType) },
})
-- Create the box table.
local boxTable
-- Check for fmbox because not all interface messages have mw-parser-output
-- which is necessary for TemplateStyles. Add the wrapper class if it is and
-- then start the actual mbox, else start the mbox.
if self.boxType == 'fmbox' then
boxTable = root:tag('div')
:addClass('mw-parser-output')
:tag('table')
else
boxTable = root:tag('table')
end
boxTable:attr('id', self.id or nil)
for class, _ in pairs(self.classes or {}) do
boxTable:addClass(class or nil)
end
boxTable
:cssText(self.style or nil)
:attr('role', 'presentation')
if self.attrs then
boxTable:attr(self.attrs)
end
-- Add the left-hand image.
local row = boxTable:tag('tr')
if self.imageLeft then
local imageLeftCell = row:tag('td'):addClass('mbox-image')
if self.imageCellDiv then
-- If we are using a div, redefine imageLeftCell so that the image
-- is inside it. Divs use style="width: 52px;", which limits the
-- image width to 52px. If any images in a div are wider than that,
-- they may overlap with the text or cause other display problems.
imageLeftCell = imageLeftCell:tag('div'):css('width', '52px')
end
imageLeftCell:wikitext(self.imageLeft or nil)
elseif self.imageEmptyCell then
-- Some message boxes define an empty cell if no image is specified, and
-- some don't. The old template code in templates where empty cells are
-- specified gives the following hint: "No image. Cell with some width
-- or padding necessary for text cell to have 100% width."
row:tag('td')
:addClass('mbox-empty-cell')
:cssText(self.imageEmptyCellStyle or nil)
end
-- Add the text.
local textCell = row:tag('td'):addClass('mbox-text')
if self.useCollapsibleTextFields then
-- The message box uses advanced text parameters that allow things to be
-- collapsible. At the moment, only ambox uses this.
textCell:cssText(self.textstyle or nil)
local textCellDiv = textCell:tag('div')
textCellDiv
:addClass('mbox-text-span')
:wikitext(self.issue or nil)
if (self.talk or self.fix) and not self.isSmall then
textCellDiv:tag('span')
:addClass('hide-when-compact')
:wikitext(self.talk and (' ' .. self.talk) or nil)
:wikitext(self.fix and (' ' .. self.fix) or nil)
end
textCellDiv:wikitext(self.date and (' ' .. self.date) or nil)
if self.info and not self.isSmall then
textCellDiv
:tag('span')
:addClass('hide-when-compact')
:wikitext(self.info and (' ' .. self.info) or nil)
end
if self.removalNotice then
textCellDiv:tag('small')
:addClass('hide-when-compact')
:tag('i')
:wikitext(string.format(" (%s)", self.removalNotice))
end
else
-- Default text formatting - anything goes.
textCell
:cssText(self.textstyle or nil)
:wikitext(self.text or nil)
end
-- Add the right-hand image.
if self.imageRight then
local imageRightCell = row:tag('td'):addClass('mbox-imageright')
if self.imageCellDiv then
-- If we are using a div, redefine imageRightCell so that the image
-- is inside it.
imageRightCell = imageRightCell:tag('div'):css('width', '52px')
end
imageRightCell
:wikitext(self.imageRight or nil)
end
-- Add the below row.
if self.below then
boxTable:tag('tr')
:tag('td')
:attr('colspan', self.imageRight and '3' or '2')
:addClass('mbox-text')
:cssText(self.textstyle or nil)
:wikitext(self.below or nil)
end
-- Add error message for invalid type parameters.
if self.invalidTypeError then
root:tag('div')
:css('text-align', 'center')
:wikitext(string.format(
'This message box is using an invalid "type=%s" parameter and needs fixing.',
self.type or ''
))
end
-- Add categories.
root:wikitext(self:renderCategories() or nil)
return tostring(root)
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p, mt = {}, {}
function p._exportClasses()
-- For testing.
return {
MessageBox = MessageBox
}
end
function p.main(boxType, args, cfgTables)
local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE))
box:setParameters()
box:setCategories()
return box:export()
end
function mt.__index(t, k)
return function (frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
return t.main(k, getArgs(frame, {trim = false, removeBlanks = false}))
end
end
return setmetatable(p, mt)
fcf2586b774e6db72e0a2837019f5b445124ddc4
Module:Yesno
828
7
12
2023-03-15T21:18:30Z
Ancyker
1
Created page with "-- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val =..."
Scribunto
text/plain
-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
return function (val, default)
-- If your wiki uses non-ascii characters for any of "yes", "no", etc., you
-- should replace "val:lower()" with "mw.ustring.lower(val)" in the
-- following line.
val = type(val) == 'string' and val:lower() or val
if val == nil then
return nil
elseif val == true
or val == 'yes'
or val == 'y'
or val == 'true'
or val == 't'
or val == 'on'
or tonumber(val) == 1
then
return true
elseif val == false
or val == 'no'
or val == 'n'
or val == 'false'
or val == 'f'
or val == 'off'
or tonumber(val) == 0
then
return false
else
return default
end
end
f767643e7d12126d020d88d662a3dd057817b9dc
Module:Arguments
828
8
13
2023-03-15T21:19:19Z
Ancyker
1
Created page with "-- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string'..."
Scribunto
text/plain
-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. It is intended for use by other Lua modules, and should not be
-- called from #invoke directly.
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local arguments = {}
-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.
local function tidyValDefault(key, val)
if type(val) == 'string' then
val = val:match('^%s*(.-)%s*$')
if val == '' then
return nil
else
return val
end
else
return val
end
end
local function tidyValTrimOnly(key, val)
if type(val) == 'string' then
return val:match('^%s*(.-)%s*$')
else
return val
end
end
local function tidyValRemoveBlanksOnly(key, val)
if type(val) == 'string' then
if val:find('%S') then
return val
else
return nil
end
else
return val
end
end
local function tidyValNoChange(key, val)
return val
end
local function matchesTitle(given, title)
local tp = type( given )
return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title
end
local translate_mt = { __index = function(t, k) return k end }
function arguments.getArgs(frame, options)
checkType('getArgs', 1, frame, 'table', true)
checkType('getArgs', 2, options, 'table', true)
frame = frame or {}
options = options or {}
--[[
-- Set up argument translation.
--]]
options.translate = options.translate or {}
if getmetatable(options.translate) == nil then
setmetatable(options.translate, translate_mt)
end
if options.backtranslate == nil then
options.backtranslate = {}
for k,v in pairs(options.translate) do
options.backtranslate[v] = k
end
end
if options.backtranslate and getmetatable(options.backtranslate) == nil then
setmetatable(options.backtranslate, {
__index = function(t, k)
if options.translate[k] ~= k then
return nil
else
return k
end
end
})
end
--[[
-- Get the argument tables. If we were passed a valid frame object, get the
-- frame arguments (fargs) and the parent frame arguments (pargs), depending
-- on the options set and on the parent frame's availability. If we weren't
-- passed a valid frame object, we are being called from another Lua module
-- or from the debug console, so assume that we were passed a table of args
-- directly, and assign it to a new variable (luaArgs).
--]]
local fargs, pargs, luaArgs
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
if options.wrappers then
--[[
-- The wrappers option makes Module:Arguments look up arguments in
-- either the frame argument table or the parent argument table, but
-- not both. This means that users can use either the #invoke syntax
-- or a wrapper template without the loss of performance associated
-- with looking arguments up in both the frame and the parent frame.
-- Module:Arguments will look up arguments in the parent frame
-- if it finds the parent frame's title in options.wrapper;
-- otherwise it will look up arguments in the frame object passed
-- to getArgs.
--]]
local parent = frame:getParent()
if not parent then
fargs = frame.args
else
local title = parent:getTitle():gsub('/sandbox$', '')
local found = false
if matchesTitle(options.wrappers, title) then
found = true
elseif type(options.wrappers) == 'table' then
for _,v in pairs(options.wrappers) do
if matchesTitle(v, title) then
found = true
break
end
end
end
-- We test for false specifically here so that nil (the default) acts like true.
if found or options.frameOnly == false then
pargs = parent.args
end
if not found or options.parentOnly == false then
fargs = frame.args
end
end
else
-- options.wrapper isn't set, so check the other options.
if not options.parentOnly then
fargs = frame.args
end
if not options.frameOnly then
local parent = frame:getParent()
pargs = parent and parent.args or nil
end
end
if options.parentFirst then
fargs, pargs = pargs, fargs
end
else
luaArgs = frame
end
-- Set the order of precedence of the argument tables. If the variables are
-- nil, nothing will be added to the table, which is how we avoid clashes
-- between the frame/parent args and the Lua args.
local argTables = {fargs}
argTables[#argTables + 1] = pargs
argTables[#argTables + 1] = luaArgs
--[[
-- Generate the tidyVal function. If it has been specified by the user, we
-- use that; if not, we choose one of four functions depending on the
-- options chosen. This is so that we don't have to call the options table
-- every time the function is called.
--]]
local tidyVal = options.valueFunc
if tidyVal then
if type(tidyVal) ~= 'function' then
error(
"bad value assigned to option 'valueFunc'"
.. '(function expected, got '
.. type(tidyVal)
.. ')',
2
)
end
elseif options.trim ~= false then
if options.removeBlanks ~= false then
tidyVal = tidyValDefault
else
tidyVal = tidyValTrimOnly
end
else
if options.removeBlanks ~= false then
tidyVal = tidyValRemoveBlanksOnly
else
tidyVal = tidyValNoChange
end
end
--[[
-- Set up the args, metaArgs and nilArgs tables. args will be the one
-- accessed from functions, and metaArgs will hold the actual arguments. Nil
-- arguments are memoized in nilArgs, and the metatable connects all of them
-- together.
--]]
local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}
setmetatable(args, metatable)
local function mergeArgs(tables)
--[[
-- Accepts multiple tables as input and merges their keys and values
-- into one table. If a value is already present it is not overwritten;
-- tables listed earlier have precedence. We are also memoizing nil
-- values, which can be overwritten if they are 's' (soft).
--]]
for _, t in ipairs(tables) do
for key, val in pairs(t) do
if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
local tidiedVal = tidyVal(key, val)
if tidiedVal == nil then
nilArgs[key] = 's'
else
metaArgs[key] = tidiedVal
end
end
end
end
end
--[[
-- Define metatable behaviour. Arguments are memoized in the metaArgs table,
-- and are only fetched from the argument tables once. Fetching arguments
-- from the argument tables is the most resource-intensive step in this
-- module, so we try and avoid it where possible. For this reason, nil
-- arguments are also memoized, in the nilArgs table. Also, we keep a record
-- in the metatable of when pairs and ipairs have been called, so we do not
-- run pairs and ipairs on the argument tables more than once. We also do
-- not run ipairs on fargs and pargs if pairs has already been run, as all
-- the arguments will already have been copied over.
--]]
metatable.__index = function (t, key)
--[[
-- Fetches an argument when the args table is indexed. First we check
-- to see if the value is memoized, and if not we try and fetch it from
-- the argument tables. When we check memoization, we need to check
-- metaArgs before nilArgs, as both can be non-nil at the same time.
-- If the argument is not present in metaArgs, we also check whether
-- pairs has been run yet. If pairs has already been run, we return nil.
-- This is because all the arguments will have already been copied into
-- metaArgs by the mergeArgs function, meaning that any other arguments
-- must be nil.
--]]
if type(key) == 'string' then
key = options.translate[key]
end
local val = metaArgs[key]
if val ~= nil then
return val
elseif metatable.donePairs or nilArgs[key] then
return nil
end
for _, argTable in ipairs(argTables) do
local argTableVal = tidyVal(key, argTable[key])
if argTableVal ~= nil then
metaArgs[key] = argTableVal
return argTableVal
end
end
nilArgs[key] = 'h'
return nil
end
metatable.__newindex = function (t, key, val)
-- This function is called when a module tries to add a new value to the
-- args table, or tries to change an existing value.
if type(key) == 'string' then
key = options.translate[key]
end
if options.readOnly then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; the table is read-only',
2
)
elseif options.noOverwrite and args[key] ~= nil then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; overwriting existing arguments is not permitted',
2
)
elseif val == nil then
--[[
-- If the argument is to be overwritten with nil, we need to erase
-- the value in metaArgs, so that __index, __pairs and __ipairs do
-- not use a previous existing value, if present; and we also need
-- to memoize the nil in nilArgs, so that the value isn't looked
-- up in the argument tables if it is accessed again.
--]]
metaArgs[key] = nil
nilArgs[key] = 'h'
else
metaArgs[key] = val
end
end
local function translatenext(invariant)
local k, v = next(invariant.t, invariant.k)
invariant.k = k
if k == nil then
return nil
elseif type(k) ~= 'string' or not options.backtranslate then
return k, v
else
local backtranslate = options.backtranslate[k]
if backtranslate == nil then
-- Skip this one. This is a tail call, so this won't cause stack overflow
return translatenext(invariant)
else
return backtranslate, v
end
end
end
metatable.__pairs = function ()
-- Called when pairs is run on the args table.
if not metatable.donePairs then
mergeArgs(argTables)
metatable.donePairs = true
end
return translatenext, { t = metaArgs }
end
local function inext(t, i)
-- This uses our __index metamethod
local v = t[i + 1]
if v ~= nil then
return i + 1, v
end
end
metatable.__ipairs = function (t)
-- Called when ipairs is run on the args table.
return inext, t, 0
end
return args
end
return arguments
3134ecce8429b810d445e29eae115e2ae4c36c53
Module:Template translation
828
9
14
2023-03-15T21:20:01Z
Ancyker
1
Created page with "local this = {} function this.checkLanguage(subpage, default) --[[Check first if there's an any invalid character that would cause the mw.language.isKnownLanguageTag function() to throw an exception: - all ASCII controls in [\000-\031\127], - double quote ("), sharp sign (#), ampersand (&), apostrophe ('), - slash (/), colon (:), semicolon (;), lower than (<), greater than (>), - brackets and braces ([, ], {, }), pipe (|), bac..."
Scribunto
text/plain
local this = {}
function this.checkLanguage(subpage, default)
--[[Check first if there's an any invalid character that would cause the
mw.language.isKnownLanguageTag function() to throw an exception:
- all ASCII controls in [\000-\031\127],
- double quote ("), sharp sign (#), ampersand (&), apostrophe ('),
- slash (/), colon (:), semicolon (;), lower than (<), greater than (>),
- brackets and braces ([, ], {, }), pipe (|), backslash (\\)
All other characters are accepted, including space and all non-ASCII
characters (including \192, which is invalid in UTF-8).
--]]
if mw.language.isValidCode(subpage) and mw.language.isKnownLanguageTag(subpage)
--[[However "SupportedLanguages" are too restrictive, as they discard many
valid BCP47 script variants (only because MediaWiki still does not
define automatic transliterators for them, e.g. "en-dsrt" or
"fr-brai" for French transliteration in Braille), and country variants,
(useful in localized data, even if they are no longer used for
translations, such as zh-cn, also useful for legacy codes).
We want to avoid matching subpagenames containing any uppercase letter,
(even if they are considered valid in BCP 47, in which they are
case-insensitive; they are not "SupportedLanguages" for MediaWiki, so
they are not "KnownLanguageTags" for MediaWiki).
To be more restrictive, we exclude any character
* that is not ASCII and not a lowercase letter, minus-hyphen, or digit,
or does not start by a letter or does not finish by a letter or digit;
* or that has more than 8 characters between hyphens;
* or that has two hyphens;
* or with specific uses in template subpages and unusable as languages.
--]]
or string.find(subpage, "^[%l][%-%d%l]*[%d%l]$") ~= nil
and string.find(subpage, "[%d%l][%d%l][%d%l][%d%l][%d%l][%d%l][%d%l][%d%l][%d%l]") == nil
and string.find(subpage, "%-%-") == nil
and subpage ~= "doc"
and subpage ~= "layout"
and subpage ~= "sandbox"
and subpage ~= "testcases"
and subpage ~= "init"
and subpage ~= "preload"
and subpage ~= "subpage"
and subpage ~= "subpage2"
and subpage ~= "sub-subpage"
and subpage ~= "sub-sub-subpage"
and subpage ~= "sub-sub-sub-subpage"
then
return subpage
end
-- Otherwise there's currently no known language subpage
return default
end
--[[Get the last subpage of an arbitrary page if it is a translation.
To be used from templates.
]]
function this.getLanguageSubpage(frame)
local title = frame and frame.args[1]
if not title or title == '' then
title = mw.title.getCurrentTitle()
end
return this._getLanguageSubpage(title)
end
--[[Get the last subpage of an arbitrary page if it is a translation.
To be used from Lua.
]]
function this._getLanguageSubpage(title)
if type(title) == 'string' then
title = mw.title.new(title)
end
if not title then
-- invalid title
return mw.language.getContentLanguage():getCode()
end
--[[This code does not work in all namespaces where the Translate tool works.
-- It works in the main namespace on Meta because it allows subpages there
-- It would not work in the main namespace of English Wikipedia (but the
-- articles are monolignual on that wiki).
-- On Meta-Wiki the main space uses subpages and its pages are translated.
-- The Translate tool allows translatng pages in all namespaces, even if
-- the namespace officially does not have subpages.
-- On Meta-Wiki the Category namespace still does not have subpages enabled,
-- even if they would be very useful for categorizing templates, that DO have
-- subpages (for documentatio and tstboxes pages). This is a misconfiguration
-- bug of Meta-Wiki. The work-around is to split the full title and then
-- get the last titlepart.
local subpage = title.subpageText
--]]
local titleparts = mw.text.split(title.fullText, '/')
local subpage = titleparts[#titleparts]
return this.checkLanguage(subpage, mw.language.getContentLanguage():getCode())
end
--[[Get the last subpage of the current page if it is a translation.
]]
function this.getCurrentLanguageSubpage()
return this._getLanguageSubpage(mw.title.getCurrentTitle())
end
--[[Get the first part of the language code of the subpage, before the '-'.
]]
function this.getMainLanguageSubpage()
parts = mw.text.split( this.getCurrentLanguageSubpage(), '-' )
return parts[1]
end
--[[Get the last subpage of the current frame if it is a translation.
Not used locally.
]]
function this.getFrameLanguageSubpage(frame)
return this._getLanguageSubpage(frame:getParent():getTitle())
end
--[[Get the language of the current page.
Not used locally.
]]
function this.getLanguage()
local subpage = mw.title.getCurrentTitle().subpageText
return this.checkLanguage(subpage, mw.language.getContentLanguage():getCode())
end
--[[Get the language of the current frame.
Not used locally.
]]
function this.getFrameLanguage(frame)
local titleparts = mw.text.split(frame:getParent():getTitle(), '/')
local subpage = titleparts[#titleparts]
return this.checkLanguage(subpage, mw.language.getContentLanguage():getCode())
end
function this.title(namespace, basepagename, subpage)
local message, title
local pagename = basepagename
if (subpage or '') ~= ''
then
pagename = pagename .. '/' .. subpage
end
local valid, title = xpcall(function()
return mw.title.new(pagename, namespace) -- costly
end, function(msg) -- catch undocumented exception (!?)
-- thrown when namespace does not exist. The doc still
-- says it should return a title, even in that case...
message = msg
end)
if valid and title ~= nil and (title.id or 0) ~= 0
then
return title
end
return { -- "pseudo" mw.title object with id = nil in case of error
prefixedText = pagename, -- the only property we need below
message = message -- only for debugging
}
end
--[[If on a translation subpage (like Foobar/de), this function returns
a given template in the same language, if the translation is available.
Otherwise, the template is returned in its default language, without
modification.
This is aimed at replacing the current implementation of Template:TNTN.
This version does not expand the returned template name: this solves the
problem of self-recursion in TNT when translatable templates need themselves
to transclude other translable templates (such as Tnavbar).
]]
function this.getTranslatedTemplate(frame, withStatus)
local args = frame.args
local pagename = args['template']
--[[Check whether the pagename is actually in the Template namespace, or
if we're transcluding a main-namespace page.
(added for backward compatibility of Template:TNT)
]]
local title
local namespace = args['tntns'] or ''
if (namespace ~= '') -- Checks for tntns parameter for custom ns.
then
title = this.title(namespace, pagename) -- Costly
else -- Supposes that set page is in ns10.
namespace = 'Template'
title = this.title(namespace, pagename) -- Costly
if title.id == nil
then -- not found in the Template namespace, assume the main namespace (for backward compatibility)
namespace = ''
title = this.title(namespace, pagename) -- Costly
end
end
-- Get the last subpage and check if it matches a known language code.
local subpage = args['uselang'] or ''
if (subpage == '')
then
subpage = this.getCurrentLanguageSubpage()
end
if (subpage == '')
then
-- Check if a translation of the pagename exists in English
local newtitle = this.title(namespace, pagename, 'en') -- Costly
-- Use the translation when it exists
if newtitle.id ~= nil
then
title = newtitle
end
else
-- Check if a translation of the pagename exists in that language
local newtitle = this.title(namespace, pagename, subpage) -- Costly
if newtitle.id == nil
then
-- Check if a translation of the pagename exists in English
newtitle = this.title(namespace, pagename, 'en') -- Costly
end
-- Use the translation when it exists
if newtitle.id ~= nil
then
title = newtitle
end
end
-- At this point the title should exist
if withStatus then
-- status returned to Lua function below
return title.prefixedText, title.id ~= nil
else
-- returned directly to MediaWiki
return title.prefixedText
end
end
--[[If on a translation subpage (like Foobar/de), this function renders
a given template in the same language, if the translation is available.
Otherwise, the template is rendered in its default language, without
modification.
This is aimed at replacing the current implementation of Template:TNT.
Note that translatable templates cannot transclude themselves other
translatable templates, as it will recurse on TNT. Use TNTN instead
to return only the effective template name to expand externally, with
template parameters also provided externally.
]]
function this.renderTranslatedTemplate(frame)
local title, found = this.getTranslatedTemplate(frame, true)
-- At this point the title should exist prior to performing the expansion
-- of the template, otherwise render a red link to the missing page
-- (resolved in its assumed namespace). If we don't tet this here, a
-- script error would be thrown. Returning a red link is consistant with
-- MediaWiki behavior when attempting to transclude inexistant templates.
if not found then
return '[[' .. title .. ']]'
end
-- Copy args pseudo-table to a proper table so we can feed it to expandTemplate.
-- Then render the pagename.
local args = frame.args
local pargs = (frame:getParent() or {}).args
local arguments = {}
if (args['noshift'] or '') == ''
then
for k, v in pairs(pargs) do
-- numbered args >= 1 need to be shifted
local n = tonumber(k) or 0
if (n > 0)
then
if (n >= 2)
then
arguments[n - 1] = v
end
else
arguments[k] = v
end
end
else -- special case where TNT is used as autotranslate
-- (don't shift again what is shifted in the invokation)
for k, v in pairs(pargs) do
arguments[k] = v
end
end
arguments['template'] = title -- override the existing parameter of the base template name supplied with the full name of the actual template expanded
arguments['tntns'] = nil -- discard the specified namespace override
arguments['uselang'] = args['uselang'] -- argument forwarded into parent frame
arguments['noshift'] = args['noshift'] -- argument forwarded into parent frame
return frame:expandTemplate{title = ':' .. title, args = arguments}
end
--[[A helper for mocking TNT in Special:TemplateSandbox. TNT breaks
TemplateSandbox; mocking it with this method means templates won't be
localized but at least TemplateSandbox substitutions will work properly.
Won't work with complex uses.
]]
function this.mockTNT(frame)
local pargs = (frame:getParent() or {}).args
local arguments = {}
for k, v in pairs(pargs) do
-- numbered args >= 1 need to be shifted
local n = tonumber(k) or 0
if (n > 0)
then
if (n >= 2)
then
arguments[n - 1] = v
end
else
arguments[k] = v
end
end
if not pargs[1]
then
return ''
end
return frame:expandTemplate{title = 'Template:' .. pargs[1], args = arguments}
end
return this
d8b891aad5c405bb237bd0a79d564ccb6b8e946b
Module:Message box/configuration
828
10
15
2023-03-15T21:20:45Z
Ancyker
1
Created page with "-------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-spee..."
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Message box configuration --
-- --
-- This module contains configuration data for [[Module:Message box]]. --
--------------------------------------------------------------------------------
return {
ambox = {
types = {
speedy = {
class = 'ambox-speedy',
image = 'OOjs UI icon clock-destructive.svg'
},
delete = {
class = 'ambox-delete',
image = 'OOjs UI icon alert-destructive.svg'
},
warning = { -- alias for content
class = 'ambox-content',
image = 'OOjs UI icon notice-warning.svg'
},
content = {
class = 'ambox-content',
image = 'OOjs UI icon notice-warning.svg'
},
style = {
class = 'ambox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ambox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ambox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'ambox-notice',
image = 'OOjs UI icon information-progressive.svg'
}
},
default = 'notice',
allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
allowSmall = true,
smallParam = 'left',
smallClass = 'mbox-small-left',
substCheck = true,
classes = {'metadata', 'plainlinks', 'ambox'},
imageEmptyCell = true,
imageCheckBlank = true,
imageSmallSize = '20x20px',
imageCellDiv = true,
useCollapsibleTextFields = true,
imageRightNone = true,
sectionDefault = 'article',
allowMainspaceCategories = true,
templateCategory = 'Article message templates',
templateCategoryRequireName = true,
templateErrorCategory = nil,
templateErrorParamsToCheck = {'issue', 'fix', 'subst'}
},
cmbox = {
types = {
speedy = {
class = 'cmbox-speedy',
image = 'OOjs UI icon clock-destructive.svg'
},
delete = {
class = 'cmbox-delete',
image = 'OOjs UI icon alert-destructive.svg'
},
content = {
class = 'cmbox-content',
image = 'OOjs UI icon notice-warning.svg'
},
style = {
class = 'cmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'cmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'cmbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'cmbox-notice',
image = 'OOjs UI icon information-progressive.svg'
},
caution = {
class = 'cmbox-style',
image = 'Ambox warning yellow.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'plainlinks', 'cmbox'},
imageEmptyCell = true
},
fmbox = {
types = {
warning = {
class = 'fmbox-warning',
image = 'OOjs UI icon clock-destructive.svg'
},
editnotice = {
class = 'fmbox-editnotice',
image = 'OOjs UI icon information-progressive.svg'
},
system = {
class = 'fmbox-system',
image = 'OOjs UI icon information-progressive.svg'
}
},
default = 'system',
showInvalidTypeError = true,
classes = {'plainlinks', 'fmbox'},
imageEmptyCell = false,
imageRightNone = false
},
imbox = {
types = {
speedy = {
class = 'imbox-speedy',
image = 'OOjs UI icon clock-destructive.svg'
},
delete = {
class = 'imbox-delete',
image = 'OOjs UI icon alert-destructive.svg'
},
content = {
class = 'imbox-content',
image = 'OOjs UI icon notice-warning.svg'
},
style = {
class = 'imbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'imbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'imbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
license = {
class = 'imbox-license licensetpl',
image = 'Imbox license.png' -- @todo We need an SVG version of this
},
featured = {
class = 'imbox-featured',
image = 'Cscr-featured.svg'
},
notice = {
class = 'imbox-notice',
image = 'OOjs UI icon information-progressive.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'imbox'},
usePlainlinksParam = true,
imageEmptyCell = true,
below = true,
templateCategory = 'File message boxes'
},
ombox = {
types = {
speedy = {
class = 'ombox-speedy',
image = 'OOjs UI icon clock-destructive.svg'
},
delete = {
class = 'ombox-delete',
image = 'OOjs UI icon alert-destructive.svg'
},
warning = { -- alias for content
class = 'ombox-content',
image = 'OOjs UI icon notice-warning.svg'
},
content = {
class = 'ombox-content',
image = 'OOjs UI icon notice-warning.svg'
},
style = {
class = 'ombox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ombox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ombox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'ombox-notice',
image = 'OOjs UI icon information-progressive.svg'
},
critical = {
class = 'mbox-critical',
image = 'OOjs UI icon clock-destructive.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'plainlinks', 'ombox'},
allowSmall = true,
imageEmptyCell = true,
imageRightNone = true
},
tmbox = {
types = {
speedy = {
class = 'tmbox-speedy',
image = 'OOjs UI icon clock-destructive.svg'
},
delete = {
class = 'tmbox-delete',
image = 'OOjs UI icon alert-destructive.svg'
},
content = {
class = 'tmbox-content',
image = 'OOjs UI icon notice-warning.svg'
},
style = {
class = 'tmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'tmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'tmbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'tmbox-notice',
image = 'OOjs UI icon information-progressive.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'plainlinks', 'tmbox'},
allowSmall = true,
imageRightNone = true,
imageEmptyCell = true,
imageEmptyCellStyle = true,
templateCategory = 'Talk message boxes'
}
}
d8cf419a57983f67944903d17535c0ee0780ceb6
Module:Message box/ombox.css
828
11
16
2023-03-15T21:23:56Z
Ancyker
1
Created page with "/** * {{ombox}} (other pages message box) styles * * @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-enwp-boxes.css * @revision 2021-07-15 */ table.ombox { margin: 4px 10%; border-collapse: collapse; /* Default "notice" gray */ border: 1px solid #a2a9b1; background-color: #f8f9fa; box-sizing: border-box; } /* An empty narrow cell */ .ombox td.mbox-empty-cell { border: none; padding: 0; width: 1px; } /* The message body cell(s) */ .ombox th.mbox-te..."
sanitized-css
text/css
/**
* {{ombox}} (other pages message box) styles
*
* @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-enwp-boxes.css
* @revision 2021-07-15
*/
table.ombox {
margin: 4px 10%;
border-collapse: collapse;
/* Default "notice" gray */
border: 1px solid #a2a9b1;
background-color: #f8f9fa;
box-sizing: border-box;
}
/* An empty narrow cell */
.ombox td.mbox-empty-cell {
border: none;
padding: 0;
width: 1px;
}
/* The message body cell(s) */
.ombox th.mbox-text,
.ombox td.mbox-text {
border: none;
/* 0.9em left/right */
padding: 0.25em 0.9em;
/* Make all mboxes the same width regardless of text length */
width: 100%;
}
/* The left image cell */
.ombox td.mbox-image {
border: none;
text-align: center;
/* 0.9em left, 0px right */
/* @noflip */
padding: 2px 0 2px 0.9em;
}
/* The right image cell */
.ombox td.mbox-imageright {
border: none;
text-align: center;
/* 0px left, 0.9em right */
/* @noflip */
padding: 2px 0.9em 2px 0;
}
table.ombox-notice {
/* Gray */
border-color: #a2a9b1;
}
table.ombox-speedy {
/* Pink */
background-color: #fee7e6;
}
table.ombox-speedy,
table.ombox-delete {
/* Red */
border-color: #b32424;
border-width: 2px;
}
table.ombox-content {
/* Orange */
border-color: #f28500;
}
table.ombox-style {
/* Yellow */
border-color: #fc3;
}
table.ombox-move {
/* Purple */
border-color: #9932cc;
}
table.ombox-protection {
/* Gray-gold */
border-color: #a2a9b1;
border-width: 2px;
}
/**
* {{ombox|small=1}} styles
*
* These ".mbox-small" classes must be placed after all other
* ".ombox" classes. "html body.mediawiki .ombox"
* is so they apply only to other page message boxes.
*
* @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-enwp-boxes.css
* @revision 2021-07-15
*/
/* For the "small=yes" option. */
html body.mediawiki .ombox.mbox-small {
clear: right;
float: right;
margin: 4px 0 4px 1em;
box-sizing: border-box;
width: 238px;
font-size: 88%;
line-height: 1.25em;
}
e2c21da9b2e5ea3a68e2f5a7432cbfd3cfce80a8
Module:Documentation
828
12
17
2023-03-15T21:25:25Z
Ancyker
1
Created page with "-- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs local messageBox = require('Module:Message box') -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local i18n = mw.loadData('Module:Documentation/i18n') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -..."
Scribunto
text/plain
-- This module implements {{documentation}}.
-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
local messageBox = require('Module:Message box')
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local i18n = mw.loadData('Module:Documentation/i18n')
local p = {}
-- Often-used functions.
local ugsub = mw.ustring.gsub
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
local function message(cfgKey, valArray, expectType)
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- The function raises an error if the value from the cfg table is not
-- of the type expectType. The default type for expectType is 'string'.
-- If the table valArray is present, strings such as $1, $2 etc. in the
-- message are substituted with values from the table keys [1], [2] etc.
-- For example, if the message "foo-message" had the value 'Foo $2 bar $1.',
-- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz."
--]]
local msg = cfg[cfgKey]
expectType = expectType or 'string'
if type(msg) ~= expectType then
error(require('Module:TNT').format('I18n/Documentation', 'cfg-error-msg-type', cfgKey, expectType, type(msg)), 2)
end
if not valArray then
return msg
end
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error(require('Module:TNT').format('I18n/Documentation', 'cfg-error-msg-empty', '$' .. match, cfgKey), 4)
end
local ret = ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
return ret
end
p.message = message
local function makeWikilink(page, display)
if display then
return mw.ustring.format('[[%s|%s]]', page, display)
else
return mw.ustring.format('[[%s]]', page)
end
end
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. ':' .. cat, sort)
end
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return mw.ustring.format('[%s %s]', url, display)
end
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
local ret = {}
local lim = select('#', ...)
if lim < 1 then
return nil
end
for i = 1, lim do
ret[#ret + 1] = select(i, ...)
end
return '<small style="font-style: normal;">(' .. table.concat(ret, ' | ') .. ')</small>'
end
p.makeToolbar = makeToolbar
----------------------------------------------------------------------------
-- Argument processing
----------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame, {
valueFunc = function (key, value)
if type(value) == 'string' then
value = value:match('^%s*(.-)%s*$') -- Remove whitespace.
if key == 'heading' or value ~= '' then
return value
else
return nil
end
else
return value
end
end
})
return p[funcName](args)
end
end
----------------------------------------------------------------------------
-- Load TemplateStyles
----------------------------------------------------------------------------
p.main = function(frame)
local parent = frame.getParent(frame)
local output = p._main(parent.args)
return frame:extensionTag{ name='templatestyles', args = { src= message('templatestyles-scr') } } .. output
end
----------------------------------------------------------------------------
-- Main function
----------------------------------------------------------------------------
function p._main(args)
--[[
-- This function defines logic flow for the module.
-- @args - table of arguments passed by the user
--
-- Messages:
-- 'main-div-id' --> 'template-documentation'
-- 'main-div-classes' --> 'template-documentation iezoomfix'
--]]
local env = p.getEnvironment(args)
local root = mw.html.create()
root
:wikitext(p._getModuleWikitext(args, env))
:wikitext(p.protectionTemplate(env))
:wikitext(p.sandboxNotice(args, env))
-- This div tag is from {{documentation/start box}}, but moving it here
-- so that we don't have to worry about unclosed tags.
:tag('div')
:attr('id', message('main-div-id'))
:addClass(message('main-div-class'))
:wikitext(p._startBox(args, env))
:wikitext(p._content(args, env))
:done()
:wikitext(p._endBox(args, env))
:wikitext(p.addTrackingCategories(env))
return tostring(root)
end
----------------------------------------------------------------------------
-- Environment settings
----------------------------------------------------------------------------
function p.getEnvironment(args)
--[[
-- Returns a table with information about the environment, including title objects and other namespace- or
-- path-related data.
-- @args - table of arguments passed by the user
--
-- Title objects include:
-- env.title - the page we are making documentation for (usually the current title)
-- env.templateTitle - the template (or module, file, etc.)
-- env.docTitle - the /doc subpage.
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
-- env.printTitle - the print version of the template, located at the /Print subpage.
--
-- Data includes:
-- env.protectionLevels - the protection levels table of the title object.
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.
--
-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value
-- returned will be nil.
--]]
local env, envFuncs = {}, {}
-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value
-- returned by that function is memoized in the env table so that we don't call any of the functions
-- more than once. (Nils won't be memoized.)
setmetatable(env, {
__index = function (t, key)
local envFunc = envFuncs[key]
if envFunc then
local success, val = pcall(envFunc)
if success then
env[key] = val -- Memoise the value.
return val
end
end
return nil
end
})
function envFuncs.title()
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args.page
if titleArg then
title = mw.title.new(titleArg)
else
title = mw.title.getCurrentTitle()
end
return title
end
function envFuncs.templateTitle()
--[[
-- The template (or module, etc.) title object.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
-- 'testcases-subpage' --> 'testcases'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local subpage = title.subpageText
if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then
return mw.title.makeTitle(subjectSpace, title.baseText)
else
return mw.title.makeTitle(subjectSpace, title.text)
end
end
function envFuncs.docTitle()
--[[
-- Title object of the /doc subpage.
-- Messages:
-- 'doc-subpage' --> 'doc'
--]]
local title = env.title
local docname = args[1] -- User-specified doc page.
local docpage
if docname then
docpage = docname
else
docpage = env.docpageBase .. '/' .. message('doc-subpage')
end
return mw.title.new(docpage)
end
function envFuncs.sandboxTitle()
--[[
-- Title object for the /sandbox subpage.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))
end
function envFuncs.testcasesTitle()
--[[
-- Title object for the /testcases subpage.
-- Messages:
-- 'testcases-subpage' --> 'testcases'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
function envFuncs.printTitle()
--[[
-- Title object for the /Print subpage.
-- Messages:
-- 'print-subpage' --> 'Print'
--]]
return env.templateTitle:subPageTitle(message('print-subpage'))
end
function envFuncs.protectionLevels()
-- The protection levels table of the title object.
return env.title.protectionLevels
end
function envFuncs.subjectSpace()
-- The subject namespace number.
return mw.site.namespaces[env.title.namespace].subject.id
end
function envFuncs.docSpace()
-- The documentation namespace number. For most namespaces this is the same as the
-- subject namespace. However, pages in the Article, File, MediaWiki or Category
-- namespaces must have their /doc, /sandbox and /testcases pages in talk space.
local subjectSpace = env.subjectSpace
if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then
return subjectSpace + 1
else
return subjectSpace
end
end
function envFuncs.docpageBase()
-- The base page of the /doc, /sandbox, and /testcases subpages.
-- For some namespaces this is the talk page, rather than the template page.
local templateTitle = env.templateTitle
local docSpace = env.docSpace
local docSpaceText = mw.site.namespaces[docSpace].name
-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.
return docSpaceText .. ':' .. templateTitle.text
end
function envFuncs.compareUrl()
-- Diff link between the sandbox and the main template using [[Special:ComparePages]].
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.fullUrl(
'Special:ComparePages',
{page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
return tostring(compareUrl)
else
return nil
end
end
return env
end
----------------------------------------------------------------------------
-- Auxiliary templates
----------------------------------------------------------------------------
p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext')
function p._getModuleWikitext(args, env)
local currentTitle = mw.title.getCurrentTitle()
if currentTitle.contentModel ~= 'Scribunto' then return end
pcall(require, currentTitle.prefixedText) -- if it fails, we don't care
local moduleWikitext = package.loaded["Module:Module wikitext"]
if moduleWikitext then
return moduleWikitext.main()
end
end
function p.sandboxNotice(args, env)
--[=[
-- Generates a sandbox notice for display above sandbox pages.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-notice-image' --> '[[Image:Sandbox.svg|50px|alt=|link=]]'
-- 'sandbox-notice-blurb' --> 'This is the $1 for $2.'
-- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).'
-- 'sandbox-notice-pagetype-template' --> '[[w:Wikipedia:Template test cases|template sandbox]] page'
-- 'sandbox-notice-pagetype-module' --> '[[w:Wikipedia:Template test cases|module sandbox]] page'
-- 'sandbox-notice-pagetype-other' --> 'sandbox page'
-- 'sandbox-notice-compare-link-display' --> 'diff'
-- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.'
-- 'sandbox-notice-testcases-link-display' --> 'test cases'
-- 'sandbox-category' --> 'Template sandboxes'
--]=]
local title = env.title
local sandboxTitle = env.sandboxTitle
local templateTitle = env.templateTitle
local subjectSpace = env.subjectSpace
if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then
return nil
end
-- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text".
local omargs = {}
omargs.image = message('sandbox-notice-image')
-- Get the text. We start with the opening blurb, which is something like
-- "This is the template sandbox for [[Template:Foo]] (diff)."
local text = ''
local frame = mw.getCurrentFrame()
local isPreviewing = frame:preprocess('{{REVISIONID}}') == '' -- True if the page is being previewed.
local pagetype
if subjectSpace == 10 then
pagetype = message('sandbox-notice-pagetype-template')
elseif subjectSpace == 828 then
pagetype = message('sandbox-notice-pagetype-module')
else
pagetype = message('sandbox-notice-pagetype-other')
end
local templateLink = makeWikilink(templateTitle.prefixedText)
local compareUrl = env.compareUrl
if isPreviewing or not compareUrl then
text = text .. message('sandbox-notice-blurb', {pagetype, templateLink})
else
local compareDisplay = message('sandbox-notice-compare-link-display')
local compareLink = makeUrlLink(compareUrl, compareDisplay)
text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink})
end
-- Get the test cases page blurb if the page exists. This is something like
-- "See also the companion subpage for [[Template:Foo/testcases|test cases]]."
local testcasesTitle = env.testcasesTitle
if testcasesTitle and testcasesTitle.exists then
if testcasesTitle.contentModel == "Scribunto" then
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink})
else
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink})
end
end
-- Add the sandbox to the sandbox category.
text = text .. makeCategoryLink(message('sandbox-category'))
omargs.text = text
omargs.class = message('sandbox-class')
local ret = '<div style="clear: both;"></div>'
ret = ret .. messageBox.main('ombox', omargs)
return ret
end
function p.protectionTemplate(env)
-- Generates the padlock icon in the top right.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'protection-template' --> 'pp-template'
-- 'protection-template-args' --> {docusage = 'yes'}
local title = env.title
local protectionLevels
local protectionTemplate = message('protection-template')
local namespace = title.namespace
if not (protectionTemplate and (namespace == 10 or namespace == 828)) then
-- Don't display the protection template if we are not in the template or module namespaces.
return nil
end
protectionLevels = env.protectionLevels
if not protectionLevels then
return nil
end
local editLevels = protectionLevels.edit
local moveLevels = protectionLevels.move
if moveLevels and moveLevels[1] == 'sysop' or editLevels and editLevels[1] then
-- The page is full-move protected, or full, template, or semi-protected.
local frame = mw.getCurrentFrame()
return frame:expandTemplate{title = protectionTemplate, args = message('protection-template-args', nil, 'table')}
else
return nil
end
end
----------------------------------------------------------------------------
-- Start box
----------------------------------------------------------------------------
p.startBox = makeInvokeFunc('_startBox')
function p._startBox(args, env)
--[[
-- This function generates the start box.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox
-- which generate the box HTML.
--]]
env = env or p.getEnvironment(args)
local links
local content = args.content
if not content then
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if linksData then
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if data then
return p.renderStartBox(data)
else
-- User specified no heading.
return nil
end
end
function p.makeStartBoxLinksData(args, env)
--[[
-- Does initial processing of data to make the [view] [edit] [history] [purge] links.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'view-link-display' --> 'view'
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'purge-link-display' --> 'purge'
-- 'file-docpage-preload' --> 'Template:Documentation/preload-filespace'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --> 'Template:Documentation/preload'
-- 'create-link-display' --> 'create'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local docTitle = env.docTitle
if not title or not docTitle then
return nil
end
if docTitle.isRedirect then
docTitle = docTitle.redirectTarget
end
local data = {}
data.title = title
data.docTitle = docTitle
-- View, display, edit, and purge links if /doc exists.
data.viewLinkDisplay = i18n['view-link-display']
data.editLinkDisplay = i18n['edit-link-display']
data.historyLinkDisplay = i18n['history-link-display']
data.purgeLinkDisplay = i18n['purge-link-display']
-- Create link if /doc doesn't exist.
local preload = args.preload
if not preload then
if subjectSpace == 6 then -- File namespace
preload = message('file-docpage-preload')
elseif subjectSpace == 828 then -- Module namespace
preload = message('module-preload')
else
preload = message('docpage-preload')
end
end
data.preload = preload
data.createLinkDisplay = i18n['create-link-display']
return data
end
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local function escapeBrackets(s)
-- Escapes square brackets with HTML entities.
s = s:gsub('%[', '[') -- Replace square brackets with HTML entities.
s = s:gsub('%]', ']')
return s
end
local ret
local docTitle = data.docTitle
local title = data.title
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay)
local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay)
local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
ret = '[%s] [%s] [%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
else
local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
ret = '[%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, createLink)
end
return ret
end
function p.makeStartBoxData(args, env, links)
--[=[
-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
--
-- Messages:
-- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=Documentation icon]]'
-- 'template-namespace-heading' --> 'Template documentation'
-- 'module-namespace-heading' --> 'Module documentation'
-- 'file-namespace-heading' --> 'Summary'
-- 'other-namespaces-heading' --> 'Documentation'
-- 'start-box-linkclasses' --> 'mw-editsection-like plainlinks'
-- 'start-box-link-id' --> 'doc_editlinks'
-- 'testcases-create-link-display' --> 'create'
--]=]
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
-- if an error occurs.
subjectSpace = 2
end
local data = {}
-- Heading
local heading = args.heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
return nil
end
if heading then
data.heading = heading
elseif subjectSpace == 10 then -- Template namespace
data.heading = i18n['template-namespace-heading']
elseif subjectSpace == 828 then -- Module namespace
data.heading = i18n['module-namespace-heading']
elseif subjectSpace == 6 then -- File namespace
data.heading = i18n['file-namespace-heading']
else
data.heading = i18n['other-namespaces-heading']
end
-- Data for the [view][edit][history][purge] or [create] links.
if links then
data.linksClass = message('start-box-linkclasses')
data.linksId = message('start-box-link-id')
data.links = links
end
return data
end
function p.renderStartBox(data)
-- Renders the start box html.
-- @data - a table of data generated by p.makeStartBoxData.
local sbox = mw.html.create('div')
sbox
:addClass(message('header-div-class'))
:tag('div')
:addClass(message('heading-div-class'))
:wikitext(data.heading)
local links = data.links
if links then
sbox
:tag('div')
:addClass(data.linksClass)
:attr('id', data.linksId)
:wikitext(links)
end
return tostring(sbox)
end
----------------------------------------------------------------------------
-- Documentation content
----------------------------------------------------------------------------
p.content = makeInvokeFunc('_content')
function p._content(args, env)
-- Displays the documentation contents
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local content = args.content
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle}
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- of docs are interpreted correctly.
local cbox = mw.html.create('div')
cbox
:addClass(message('content-div-class'))
:wikitext('\n' .. (content or '') .. '\n')
return tostring(cbox)
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if not args.content and docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
----------------------------------------------------------------------------
-- End box
----------------------------------------------------------------------------
p.endBox = makeInvokeFunc('_endBox')
function p._endBox(args, env)
--[=[
-- This function generates the end box (also known as the link box).
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--]=]
-- Get environment data.
env = env or p.getEnvironment(args)
local subjectSpace = env.subjectSpace
local docTitle = env.docTitle
if not subjectSpace or not docTitle then
return nil
end
-- Check whether we should output the end box at all. Add the end
-- box by default if the documentation exists or if we are in the
-- user, module or template namespaces.
local linkBox = args['link box']
if linkBox == 'off'
or not (
docTitle.exists
or subjectSpace == 2
or subjectSpace == 828
or subjectSpace == 10
)
then
return nil
end
-- Assemble the footer text field.
local text = ''
if linkBox then
text = text .. linkBox
else
text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]."
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
-- We are in the user, template or module namespaces.
-- Add sandbox and testcases links.
-- "Editors can experiment in this template's sandbox and testcases pages."
text = text .. (p.makeExperimentBlurb(args, env) or '')
text = text .. '<br />'
if not args.content and not args[1] then
-- "Please add categories to the /doc subpage."
-- Don't show this message with inline docs or with an explicitly specified doc page,
-- as then it is unclear where to add the categories.
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
local printBlurb = p.makePrintBlurb(args, env) -- Two-line blurb about print versions of templates.
if printBlurb then
text = text .. '<br />' .. printBlurb
end
end
end
local ebox = mw.html.create('div')
ebox
:addClass(message('footer-div-class'))
:wikitext(text)
return tostring(ebox)
end
function p.makeDocPageBlurb(args, env)
--[=[
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)".
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->
-- 'The above [[w:Wikipedia:Template documentation|documentation]]
-- is [[w:Wikipedia:Transclusion|transcluded]] from $1.'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[w:Wikipedia:Lua|Scribunto module]].'
--]=]
local docTitle = env.docTitle
if not docTitle or args.content then
return nil
end
local ret
if docTitle.exists then
-- /doc exists; link to it.
local docLink = makeWikilink(docTitle.prefixedText)
local editUrl = docTitle:fullUrl{action = 'edit'}
local editDisplay = i18n['edit-link-display']
local editLink = makeUrlLink(editUrl, editDisplay)
local historyUrl = docTitle:fullUrl{action = 'history'}
local historyDisplay = i18n['history-link-display']
local historyLink = makeUrlLink(historyUrl, historyDisplay)
ret = message('transcluded-from-blurb', {docLink})
.. ' '
.. makeToolbar(editLink, historyLink)
.. '<br />'
elseif env.subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')}
local createDisplay = i18n['create-link-display']
local createLink = makeUrlLink(createUrl, createDisplay)
ret = message('create-module-doc-blurb', {createLink})
.. '<br />'
end
return ret
end
function p.makeExperimentBlurb(args, env)
--[[
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-link-display' --> 'sandbox'
-- 'sandbox-edit-link-display' --> 'edit'
-- 'compare-link-display' --> 'diff'
-- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'sandbox-create-link-display' --> 'create'
-- 'mirror-edit-summary' --> 'Create sandbox version of $1'
-- 'mirror-link-display' --> 'mirror'
-- 'mirror-link-preload' --> 'Template:Documentation/mirror'
-- 'sandbox-link-display' --> 'sandbox'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display'--> 'edit'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'testcases-create-link-display' --> 'create'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display' --> 'edit'
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases'
-- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases'
-- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.'
-- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
local testcasesTitle = env.testcasesTitle
local templatePage = templateTitle.prefixedText
if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then
return nil
end
-- Make links.
local sandboxLinks, testcasesLinks
if sandboxTitle.exists then
local sandboxPage = sandboxTitle.prefixedText
local sandboxDisplay = message('sandbox-link-display')
local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)
local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'}
local sandboxEditDisplay = message('sandbox-edit-link-display')
local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay)
local compareUrl = env.compareUrl
local compareLink
if compareUrl then
local compareDisplay = message('compare-link-display')
compareLink = makeUrlLink(compareUrl, compareDisplay)
end
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)
else
local sandboxPreload
if subjectSpace == 828 then
sandboxPreload = message('module-sandbox-preload')
else
sandboxPreload = message('template-sandbox-preload')
end
local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload}
local sandboxCreateDisplay = message('sandbox-create-link-display')
local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)
local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})
local mirrorPreload = message('mirror-link-preload')
local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}
local mirrorDisplay = message('mirror-link-display')
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
if testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)
local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'}
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
else
local testcasesPreload
if subjectSpace == 828 then
testcasesPreload = message('module-testcases-preload')
else
testcasesPreload = message('template-testcases-preload')
end
local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload}
local testcasesCreateDisplay = message('testcases-create-link-display')
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)
end
local messageName
if subjectSpace == 828 then
messageName = 'experiment-blurb-module'
else
messageName = 'experiment-blurb-template'
end
return message(messageName, {sandboxLinks, testcasesLinks})
end
function p.makeCategoriesBlurb(args, env)
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --> '/doc'
-- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
end
function p.makeSubpagesBlurb(args, env)
--[[
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --> 'template'
-- 'module-pagetype' --> 'module'
-- 'default-pagetype' --> 'page'
-- 'subpages-link-display' --> 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
if not subjectSpace or not templateTitle then
return nil
end
local pagetype
if subjectSpace == 10 then
pagetype = message('template-pagetype')
elseif subjectSpace == 828 then
pagetype = message('module-pagetype')
else
pagetype = message('default-pagetype')
end
local subpagesLink = makeWikilink(
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
)
return message('subpages-blurb', {subpagesLink})
end
function p.makePrintBlurb(args, env)
--[=[
-- Generates the blurb displayed when there is a print version of the template available.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'print-link-display' --> '/Print'
-- 'print-blurb' --> 'A [[Help:Books/for experts#Improving the book layout|print version]]'
-- .. ' of this template exists at $1.'
-- .. ' If you make a change to this template, please update the print version as well.'
-- 'display-print-category' --> true
-- 'print-category' --> 'Templates with print versions'
--]=]
local printTitle = env.printTitle
if not printTitle then
return nil
end
local ret
if printTitle.exists then
local printLink = makeWikilink(printTitle.prefixedText, message('print-link-display'))
ret = message('print-blurb', {printLink})
local displayPrintCategory = message('display-print-category', nil, 'boolean')
if displayPrintCategory then
ret = ret .. makeCategoryLink(message('print-category'))
end
end
return ret
end
----------------------------------------------------------------------------
-- Tracking categories
----------------------------------------------------------------------------
function p.addTrackingCategories(env)
--[[
-- Check if {{documentation}} is transcluded on a /doc or /testcases page.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'display-strange-usage-category' --> true
-- 'doc-subpage' --> 'doc'
-- 'testcases-subpage' --> 'testcases'
-- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage'
--
-- /testcases pages in the module namespace are not categorised, as they may have
-- {{documentation}} transcluded automatically.
--]]
local title = env.title
local subjectSpace = env.subjectSpace
if not title or not subjectSpace then
return nil
end
local subpage = title.subpageText
local ret = ''
if message('display-strange-usage-category', nil, 'boolean')
and (
subpage == message('doc-subpage')
or subjectSpace ~= 828 and subpage == message('testcases-subpage')
)
then
ret = ret .. makeCategoryLink(message('strange-usage-category'))
end
return ret
end
return p
0e23eec0d3c20c23afcd28849e240b9083dbcf88
Module:Documentation/config
828
13
18
2023-03-15T21:25:57Z
Ancyker
1
Created page with "---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------..."
Scribunto
text/plain
----------------------------------------------------------------------------------------------------
--
-- Configuration for Module:Documentation
--
-- Here you can set the values of the parameters and messages used in Module:Documentation to
-- localise it to your wiki and your language. Unless specified otherwise, values given here
-- should be string values.
----------------------------------------------------------------------------------------------------
local _format = require('Module:TNT').format
local function format(id)
return _format('I18n/Documentation', id)
end
local cfg = {} -- Do not edit this line.
cfg['templatestyles-scr'] = 'Module:Documentation/styles.css'
----------------------------------------------------------------------------------------------------
-- Protection template configuration
----------------------------------------------------------------------------------------------------
-- cfg['protection-template']
-- The name of the template that displays the protection icon (a padlock on enwiki).
cfg['protection-template'] = 'pp-template'
-- cfg['protection-reason-edit']
-- The protection reason for edit-protected templates to pass to
-- [[Module:Protection banner]].
cfg['protection-reason-edit'] = 'template'
--[[
-- cfg['protection-template-args']
-- Any arguments to send to the protection template. This should be a Lua table.
-- For example, if the protection template is "pp-template", and the wikitext template invocation
-- looks like "{{pp-template|docusage=yes}}", then this table should look like "{docusage = 'yes'}".
--]]
cfg['protection-template-args'] = {docusage = 'yes'}
--[[
----------------------------------------------------------------------------------------------------
-- Sandbox notice configuration
--
-- On sandbox pages the module can display a template notifying users that the current page is a
-- sandbox, and the location of test cases pages, etc. The module decides whether the page is a
-- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the
-- messages that the notices contains.
----------------------------------------------------------------------------------------------------
--]]
-- cfg['sandbox-notice-image']
-- The image displayed in the sandbox notice.
cfg['sandbox-notice-image'] = '[[Image:Edit In Sandbox Icon - Color.svg|40px|alt=|link=]]'
--[[
-- cfg['sandbox-notice-pagetype-template']
-- cfg['sandbox-notice-pagetype-module']
-- cfg['sandbox-notice-pagetype-other']
-- The page type of the sandbox page. The message that is displayed depends on the current subject
-- namespace. This message is used in either cfg['sandbox-notice-blurb'] or
-- cfg['sandbox-notice-diff-blurb'].
--]]
cfg['sandbox-notice-pagetype-template'] = format('sandbox-notice-pagetype-template')
cfg['sandbox-notice-pagetype-module'] = format('sandbox-notice-pagetype-module')
cfg['sandbox-notice-pagetype-other'] = format('sandbox-notice-pagetype-other')
--[[
-- cfg['sandbox-notice-blurb']
-- cfg['sandbox-notice-diff-blurb']
-- cfg['sandbox-notice-diff-display']
-- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence
-- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page
-- type, which is either cfg['sandbox-notice-pagetype-template'],
-- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what
-- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between
-- the sandbox and the main template. The display value of the diff link is set by
-- cfg['sandbox-notice-compare-link-display'].
--]]
cfg['sandbox-notice-blurb'] = format('sandbox-notice-blurb')
cfg['sandbox-notice-diff-blurb'] = format('sandbox-notice-diff-blurb')
cfg['sandbox-notice-compare-link-display'] = format('sandbox-notice-compare-link-display')
--[[
-- cfg['sandbox-notice-testcases-blurb']
-- cfg['sandbox-notice-testcases-link-display']
-- cfg['sandbox-notice-testcases-run-blurb']
-- cfg['sandbox-notice-testcases-run-link-display']
-- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page
-- corresponding to this sandbox that they can edit. $1 is a link to the test cases page.
-- cfg['sandbox-notice-testcases-link-display'] is the display value for that link.
-- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page
-- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test
-- cases page, and $2 is a link to the page to run it.
-- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test
-- cases.
--]]
cfg['sandbox-notice-testcases-blurb'] = format('sandbox-notice-testcases-blurb')
cfg['sandbox-notice-testcases-link-display'] = format('sandbox-notice-testcases-link-display')
cfg['sandbox-notice-testcases-run-blurb'] = format('sandbox-notice-testcases-run-blurb')
cfg['sandbox-notice-testcases-run-link-display'] = format('sandbox-notice-testcases-run-link-display')
-- cfg['sandbox-category']
-- A category to add to all template sandboxes.
cfg['sandbox-category'] = 'Template sandboxes'
----------------------------------------------------------------------------------------------------
-- Start box configuration
----------------------------------------------------------------------------------------------------
-- cfg['documentation-icon-wikitext']
-- The wikitext for the icon shown at the top of the template.
cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=Documentation icon]]'
----------------------------------------------------------------------------------------------------
-- Link box (end box) configuration
----------------------------------------------------------------------------------------------------
-- cfg['transcluded-from-blurb']
-- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page.
cfg['transcluded-from-blurb'] = format('transcluded-from-blurb')
--[[
-- cfg['create-module-doc-blurb']
-- Notice displayed in the module namespace when the documentation subpage does not exist.
-- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the
-- display cfg['create-link-display'].
--]]
cfg['create-module-doc-blurb'] = format('create-module-doc-blurb')
----------------------------------------------------------------------------------------------------
-- Experiment blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['experiment-blurb-template']
-- cfg['experiment-blurb-module']
-- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages.
-- It is only shown in the template and module namespaces. With the default English settings, it
-- might look like this:
--
-- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
--
-- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links.
--
-- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending
-- on what namespace we are in.
--
-- Parameters:
--
-- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display'])
--
-- If the sandbox doesn't exist, it is in the format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display'])
--
-- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload']
-- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display']
-- loads a default edit summary of cfg['mirror-edit-summary'].
--
-- $2 is a link to the test cases page. If the test cases page exists, it is in the following format:
--
-- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'])
--
-- If the test cases page doesn't exist, it is in the format:
--
-- cfg['testcases-link-display'] (cfg['testcases-create-link-display'])
--
-- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the
-- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current
-- namespace.
--]]
cfg['experiment-blurb-template'] = format('experiment-blurb-template')
cfg['experiment-blurb-module'] = format('experiment-blurb-module')
----------------------------------------------------------------------------------------------------
-- Sandbox link configuration
----------------------------------------------------------------------------------------------------
-- cfg['sandbox-subpage']
-- The name of the template subpage typically used for sandboxes.
cfg['sandbox-subpage'] = 'sandbox'
-- cfg['template-sandbox-preload']
-- Preload file for template sandbox pages.
cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox'
-- cfg['module-sandbox-preload']
-- Preload file for Lua module sandbox pages.
cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox'
-- cfg['sandbox-link-display']
-- The text to display for "sandbox" links.
cfg['sandbox-link-display'] = format('sandbox-link-display')
-- cfg['sandbox-edit-link-display']
-- The text to display for sandbox "edit" links.
cfg['sandbox-edit-link-display'] = format('sandbox-edit-link-display')
-- cfg['sandbox-create-link-display']
-- The text to display for sandbox "create" links.
cfg['sandbox-create-link-display'] = format('sandbox-create-link-display')
-- cfg['compare-link-display']
-- The text to display for "compare" links.
cfg['compare-link-display'] = format('compare-link-display')
-- cfg['mirror-edit-summary']
-- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the
-- template page.
cfg['mirror-edit-summary'] = 'Create sandbox version of $1'
-- cfg['mirror-link-display']
-- The text to display for "mirror" links.
cfg['mirror-link-display'] = format('mirror-link-display')
-- cfg['mirror-link-preload']
-- The page to preload when a user clicks the "mirror" link.
cfg['mirror-link-preload'] = 'Template:Documentation/mirror'
----------------------------------------------------------------------------------------------------
-- Test cases link configuration
----------------------------------------------------------------------------------------------------
-- cfg['testcases-subpage']
-- The name of the template subpage typically used for test cases.
cfg['testcases-subpage'] = 'testcases'
-- cfg['template-testcases-preload']
-- Preload file for template test cases pages.
cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases'
-- cfg['module-testcases-preload']
-- Preload file for Lua module test cases pages.
cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases'
-- cfg['testcases-link-display']
-- The text to display for "testcases" links.
cfg['testcases-link-display'] = format('testcases-link-display')
-- cfg['testcases-edit-link-display']
-- The text to display for test cases "edit" links.
cfg['testcases-edit-link-display'] = format('testcases-edit-link-display')
-- cfg['testcases-create-link-display']
-- The text to display for test cases "create" links.
cfg['testcases-create-link-display'] = format('testcases-create-link-display')
----------------------------------------------------------------------------------------------------
-- Add categories blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['add-categories-blurb']
-- Text to direct users to add categories to the /doc subpage. Not used if the "content" or
-- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a
-- link to the /doc subpage with a display value of cfg['doc-link-display'].
--]]
cfg['add-categories-blurb'] = format('add-categories-blurb')
-- cfg['doc-link-display']
-- The text to display when linking to the /doc subpage.
cfg['doc-link-display'] = '/doc'
----------------------------------------------------------------------------------------------------
-- Subpages link configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['subpages-blurb']
-- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a
-- display value of cfg['subpages-link-display']. In the English version this blurb is simply
-- the link followed by a period, and the link display provides the actual text.
--]]
cfg['subpages-blurb'] = format('subpages-blurb')
--[[
-- cfg['subpages-link-display']
-- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'],
-- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in
-- the template namespace, the module namespace, or another namespace.
--]]
cfg['subpages-link-display'] = format('subpages-link-display')
-- cfg['template-pagetype']
-- The pagetype to display for template pages.
cfg['template-pagetype'] = format('template-pagetype')
-- cfg['module-pagetype']
-- The pagetype to display for Lua module pages.
cfg['module-pagetype'] = format('module-pagetype')
-- cfg['default-pagetype']
-- The pagetype to display for pages other than templates or Lua modules.
cfg['default-pagetype'] = format('default-pagetype')
----------------------------------------------------------------------------------------------------
-- Doc link configuration
----------------------------------------------------------------------------------------------------
-- cfg['doc-subpage']
-- The name of the subpage typically used for documentation pages.
cfg['doc-subpage'] = 'doc'
-- cfg['file-docpage-preload']
-- Preload file for documentation page in the file namespace.
cfg['file-docpage-preload'] = 'Template:Documentation/preload-filespace'
-- cfg['docpage-preload']
-- Preload file for template documentation pages in all namespaces.
cfg['docpage-preload'] = 'Template:Documentation/preload'
-- cfg['module-preload']
-- Preload file for Lua module documentation pages.
cfg['module-preload'] = 'Template:Documentation/preload-module-doc'
----------------------------------------------------------------------------------------------------
-- Print version configuration
----------------------------------------------------------------------------------------------------
-- cfg['print-subpage']
-- The name of the template subpage used for print versions.
cfg['print-subpage'] = 'Print'
-- cfg['print-link-display']
-- The text to display when linking to the /Print subpage.
cfg['print-link-display'] = '/Print'
-- cfg['print-blurb']
-- Text to display if a /Print subpage exists. $1 is a link to the subpage with a display value of cfg['print-link-display'].
cfg['print-blurb'] = format('print-blurb')
-- cfg['display-print-category']
-- Set to true to enable output of cfg['print-category'] if a /Print subpage exists.
-- This should be a boolean value (either true or false).
cfg['display-print-category'] = true
-- cfg['print-category']
-- Category to output if cfg['display-print-category'] is set to true, and a /Print subpage exists.
cfg['print-category'] = 'Templates with print versions'
----------------------------------------------------------------------------------------------------
-- HTML and CSS configuration
----------------------------------------------------------------------------------------------------
-- cfg['main-div-id']
-- The "id" attribute of the main HTML "div" tag.
cfg['main-div-id'] = 'template-documentation'
-- cfg['main-div-classes']
-- The CSS classes added to the main HTML "div" tag.
cfg['main-div-class'] = 'ts-doc-doc'
cfg['header-div-class'] = 'ts-doc-header'
cfg['heading-div-class'] = 'ts-doc-heading'
cfg['content-div-class'] = 'ts-doc-content'
cfg['footer-div-class'] = 'ts-doc-footer plainlinks'
cfg['sandbox-class'] = 'ts-doc-sandbox'
-- cfg['start-box-linkclasses']
-- The CSS classes used for the [view][edit][history] or [create] links in the start box.
cfg['start-box-linkclasses'] = 'ts-tlinks-tlinks mw-editsection-like plainlinks'
-- cfg['start-box-link-id']
-- The HTML "id" attribute for the links in the start box.
cfg['start-box-link-id'] = 'doc_editlinks'
----------------------------------------------------------------------------------------------------
-- Tracking category configuration
----------------------------------------------------------------------------------------------------
-- cfg['display-strange-usage-category']
-- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage
-- or a /testcases subpage. This should be a boolean value (either true or false).
cfg['display-strange-usage-category'] = false
-- cfg['strange-usage-category']
-- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a
-- /doc subpage or a /testcases subpage.
cfg['strange-usage-category'] = 'Pages with strange ((documentation)) usage'
--[[
----------------------------------------------------------------------------------------------------
-- End configuration
--
-- Don't edit anything below this line.
----------------------------------------------------------------------------------------------------
--]]
return cfg
224f3664a83268936f1b9935eafc0055a97071ac
Module:TNT
828
14
19
2023-03-15T21:26:47Z
Ancyker
1
Created page with "-- -- INTRO: (!!! DO NOT RENAME THIS PAGE !!!) -- This module allows any template or module to be copy/pasted between -- wikis without any translation changes. All translation text is stored -- in the global Data:*.tab pages on Commons, and used everywhere. -- -- SEE: https://www.mediawiki.org/wiki/Multilingual_Templates_and_Modules -- -- ATTENTION: -- Please do NOT rename this module - it has to be identical on all wikis. -- This code is maintained..."
Scribunto
text/plain
--
-- INTRO: (!!! DO NOT RENAME THIS PAGE !!!)
-- This module allows any template or module to be copy/pasted between
-- wikis without any translation changes. All translation text is stored
-- in the global Data:*.tab pages on Commons, and used everywhere.
--
-- SEE: https://www.mediawiki.org/wiki/Multilingual_Templates_and_Modules
--
-- ATTENTION:
-- Please do NOT rename this module - it has to be identical on all wikis.
-- This code is maintained at https://www.mediawiki.org/wiki/Module:TNT
-- Please do not modify it anywhere else, as it may get copied and override your changes.
-- Suggestions can be made at https://www.mediawiki.org/wiki/Module_talk:TNT
--
-- DESCRIPTION:
-- The "msg" function uses a Commons dataset to translate a message
-- with a given key (e.g. source-table), plus optional arguments
-- to the wiki markup in the current content language.
-- Use lang=xx to set language. Example:
--
-- {{#invoke:TNT | msg
-- | I18n/Template:Graphs.tab <!-- https://commons.wikimedia.org/wiki/Data:I18n/Template:Graphs.tab -->
-- | source-table <!-- uses a translation message with id = "source-table" -->
-- | param1 }} <!-- optional parameter -->
--
--
-- The "doc" function will generate the <templatedata> parameter documentation for templates.
-- This way all template parameters can be stored and localized in a single Commons dataset.
-- NOTE: "doc" assumes that all documentation is located in Data:Templatedata/* on Commons.
--
-- {{#invoke:TNT | doc | Graph:Lines }}
-- uses https://commons.wikimedia.org/wiki/Data:Templatedata/Graph:Lines.tab
-- if the current page is Template:Graph:Lines/doc
--
local p = {}
local i18nDataset = 'I18n/Module:TNT.tab'
-- Forward declaration of the local functions
local sanitizeDataset, loadData, link, formatMessage
function p.msg(frame)
local dataset, id
local params = {}
local lang = nil
for k, v in pairs(frame.args) do
if k == 1 then
dataset = mw.text.trim(v)
elseif k == 2 then
id = mw.text.trim(v)
elseif type(k) == 'number' then
params[k - 2] = mw.text.trim(v)
elseif k == 'lang' and v ~= '_' then
lang = mw.text.trim(v)
end
end
return formatMessage(dataset, id, params, lang)
end
-- Identical to p.msg() above, but used from other lua modules
-- Parameters: name of dataset, message key, optional arguments
-- Example with 2 params: format('I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset')
function p.format(dataset, key, ...)
local checkType = require('libraryUtil').checkType
checkType('format', 1, dataset, 'string')
checkType('format', 2, key, 'string')
return formatMessage(dataset, key, {...})
end
-- Identical to p.msg() above, but used from other lua modules with the language param
-- Parameters: language code, name of dataset, message key, optional arguments
-- Example with 2 params: formatInLanguage('es', I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset')
function p.formatInLanguage(lang, dataset, key, ...)
local checkType = require('libraryUtil').checkType
checkType('formatInLanguage', 1, lang, 'string')
checkType('formatInLanguage', 2, dataset, 'string')
checkType('formatInLanguage', 3, key, 'string')
return formatMessage(dataset, key, {...}, lang)
end
-- Obsolete function that adds a 'c:' prefix to the first param.
-- "Sandbox/Sample.tab" -> 'c:Data:Sandbox/Sample.tab'
function p.link(frame)
return link(frame.args[1])
end
function p.doc(frame)
local dataset = 'Templatedata/' .. sanitizeDataset(frame.args[1])
return frame:extensionTag('templatedata', p.getTemplateData(dataset)) ..
formatMessage(i18nDataset, 'edit_doc', {link(dataset)})
end
function p.getTemplateData(dataset)
-- TODO: add '_' parameter once lua starts reindexing properly for "all" languages
local data = loadData(dataset)
local names = {}
for _, field in ipairs(data.schema.fields) do
table.insert(names, field.name)
end
local numOnly = true
local params = {}
local paramOrder = {}
for _, row in ipairs(data.data) do
local newVal = {}
local name = nil
for pos, columnName in ipairs(names) do
if columnName == 'name' then
name = row[pos]
else
newVal[columnName] = row[pos]
end
end
if name then
if (
(type(name) ~= "number")
and (
(type(name) ~= "string")
or not string.match(name, "^%d+$")
)
) then
numOnly = false
end
params[name] = newVal
table.insert(paramOrder, name)
end
end
-- Work around json encoding treating {"1":{...}} as an [{...}]
if numOnly then
params['zzz123']=''
end
local json = mw.text.jsonEncode({
params=params,
paramOrder=paramOrder,
description=data.description,
})
if numOnly then
json = string.gsub(json,'"zzz123":"",?', "")
end
return json
end
-- Local functions
sanitizeDataset = function(dataset)
if not dataset then
return nil
end
dataset = mw.text.trim(dataset)
if dataset == '' then
return nil
elseif string.sub(dataset,-4) ~= '.tab' then
return dataset .. '.tab'
else
return dataset
end
end
loadData = function(dataset, lang)
dataset = sanitizeDataset(dataset)
if not dataset then
error(formatMessage(i18nDataset, 'error_no_dataset', {}))
end
-- Give helpful error to thirdparties who try and copy this module.
if not mw.ext or not mw.ext.data or not mw.ext.data.get then
error(string.format([['''Missing JsonConfig extension, or not properly configured;
Cannot load https://commons.wikimedia.org/wiki/Data:%s.
See https://www.mediawiki.org/wiki/Extension:JsonConfig#Supporting_Wikimedia_templates''']], dataset))
end
local data = mw.ext.data.get(dataset, lang)
if data == false then
if dataset == i18nDataset then
-- Prevent cyclical calls
error('Missing Commons dataset ' .. i18nDataset)
else
error(formatMessage(i18nDataset, 'error_bad_dataset', {link(dataset)}))
end
end
return data
end
-- Given a dataset name, convert it to a title with the 'commons:data:' prefix
link = function(dataset)
return 'c:Data:' .. mw.text.trim(dataset or '')
end
formatMessage = function(dataset, key, params, lang)
for _, row in pairs(loadData(dataset, lang).data) do
local id, msg = unpack(row)
if id == key then
local result = mw.message.newRawMessage(msg, unpack(params or {}))
return result:plain()
end
end
if dataset == i18nDataset then
-- Prevent cyclical calls
error('Invalid message key "' .. key .. '"')
else
error(formatMessage(i18nDataset, 'error_bad_msgkey', {key, link(dataset)}))
end
end
return p
e8ec673cd9d57a37a2bc326979c7980f1657fc3a
Module:Documentation/i18n
828
15
20
2023-03-15T21:30:15Z
Ancyker
1
Created page with "local format = require('Module:TNT').format local i18n = {} i18n['cfg-error-msg-type'] = format('I18n/Documentation', 'cfg-error-msg-type') i18n['cfg-error-msg-empty'] = format('I18n/Documentation', 'cfg-error-msg-empty') -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. i18n['template-namespace-heading'] = format('I18n/Documentation', 'template-namespace-heading') -- cfg['module-namespace-heading'] -- The heading shown in the module..."
Scribunto
text/plain
local format = require('Module:TNT').format
local i18n = {}
i18n['cfg-error-msg-type'] = format('I18n/Documentation', 'cfg-error-msg-type')
i18n['cfg-error-msg-empty'] = format('I18n/Documentation', 'cfg-error-msg-empty')
-- cfg['template-namespace-heading']
-- The heading shown in the template namespace.
i18n['template-namespace-heading'] = format('I18n/Documentation', 'template-namespace-heading')
-- cfg['module-namespace-heading']
-- The heading shown in the module namespace.
i18n['module-namespace-heading'] = format('I18n/Documentation', 'module-namespace-heading')
-- cfg['file-namespace-heading']
-- The heading shown in the file namespace.
i18n['file-namespace-heading'] = format('I18n/Documentation', 'file-namespace-heading')
-- cfg['other-namespaces-heading']
-- The heading shown in other namespaces.
i18n['other-namespaces-heading'] = format('I18n/Documentation', 'other-namespaces-heading')
-- cfg['view-link-display']
-- The text to display for "view" links.
i18n['view-link-display'] = format('I18n/Documentation', 'view-link-display')
-- cfg['edit-link-display']
-- The text to display for "edit" links.
i18n['edit-link-display'] = format('I18n/Documentation', 'edit-link-display')
-- cfg['history-link-display']
-- The text to display for "history" links.
i18n['history-link-display'] = format('I18n/Documentation', 'history-link-display')
-- cfg['purge-link-display']
-- The text to display for "purge" links.
i18n['purge-link-display'] = format('I18n/Documentation', 'purge-link-display')
-- cfg['create-link-display']
-- The text to display for "create" links.
i18n['create-link-display'] = format('I18n/Documentation', 'create-link-display')
return i18n
9a9f234b177a424f1fc465eb25c484eff54905c0
Module:Documentation/styles.css
828
16
21
2023-03-15T21:35:08Z
Ancyker
1
Created page with ".ts-doc-sandbox .mbox-image { padding:.75em 0 .75em .75em; } .ts-doc-doc { clear: both; background-color: #eaf3ff; border: 1px solid #a3caff; margin-top: 1em; border-top-left-radius: 2px; border-top-right-radius: 2px; } .ts-doc-header { background-color: #c2dcff; padding: .642857em 1em .5em; border-top-left-radius: 2px; border-top-right-radius: 2px; } .ts-doc-header .ts-tlinks-tlinks { line-height: 24px; margin-left: 0; } .ts-doc-header .ts-tlinks-tlink..."
sanitized-css
text/css
.ts-doc-sandbox .mbox-image {
padding:.75em 0 .75em .75em;
}
.ts-doc-doc {
clear: both;
background-color: #eaf3ff;
border: 1px solid #a3caff;
margin-top: 1em;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.ts-doc-header {
background-color: #c2dcff;
padding: .642857em 1em .5em;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.ts-doc-header .ts-tlinks-tlinks {
line-height: 24px;
margin-left: 0;
}
.ts-doc-header .ts-tlinks-tlinks a.external {
color: #0645ad;
}
.ts-doc-header .ts-tlinks-tlinks a.external:visited {
color: #0b0080;
}
.ts-doc-header .ts-tlinks-tlinks a.external:active {
color: #faa700;
}
.ts-doc-content {
padding: .214286em 1em;
}
.ts-doc-content:after {
content: '';
clear: both;
display: block;
}
.ts-doc-heading {
display: inline-block;
padding-left: 30px;
background: center left/24px 24px no-repeat;
/* @noflip */
background-image: url(//upload.wikimedia.org/wikipedia/commons/f/fb/OOjs_UI_icon_puzzle-ltr.svg);
height: 24px;
line-height: 24px;
font-size: 13px;
font-weight: 600;
letter-spacing: 1px;
text-transform: uppercase;
}
.ts-doc-content > *:first-child,
.ts-doc-footer > *:first-child {
margin-top: .5em;
}
.ts-doc-content > *:last-child,
.ts-doc-footer > *:last-child {
margin-bottom: .5em;
}
.ts-doc-footer {
background-color: #eaf3ff;
border: 1px solid #a3caff;
padding: .214286em 1em;
margin-top: .214286em;
font-style: italic;
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
}
@media all and (min-width: 720px) {
.ts-doc-header .ts-tlinks-tlinks {
float: right;
}
}
71b09af67524324bf70d203a0a724bc74ec6c82e
Template:Lua
10
17
23
2023-03-15T21:46:49Z
Ancyker
1
Created page with "<onlyinclude><includeonly>{{#invoke:Lua banner|main}}</includeonly></onlyinclude> {{Lua|Module:Lua banner}} {{Documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->"
wikitext
text/x-wiki
<onlyinclude><includeonly>{{#invoke:Lua banner|main}}</includeonly></onlyinclude>
{{Lua|Module:Lua banner}}
{{Documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
4642b0a145984533bddd3a6f0293c56ce201b88d
Module:Lua banner
828
18
24
2023-03-15T21:47:22Z
Ancyker
1
Created page with "-- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local TNT = require('Module:TNT') local p = {} local function format(msg) return TNT.format('I18n/Lua banner', msg) end local function getConfig() return mw.loadData('Module:Lua banner/config') end function p.main(frame) local origArgs = frame:g..."
Scribunto
text/plain
-- This module implements the {{lua}} template.
local yesno = require('Module:Yesno')
local mList = require('Module:List')
local mTableTools = require('Module:TableTools')
local mMessageBox = require('Module:Message box')
local TNT = require('Module:TNT')
local p = {}
local function format(msg)
return TNT.format('I18n/Lua banner', msg)
end
local function getConfig()
return mw.loadData('Module:Lua banner/config')
end
function p.main(frame)
local origArgs = frame:getParent().args
local args = {}
for k, v in pairs(origArgs) do
v = v:match('^%s*(.-)%s*$')
if v ~= '' then
args[k] = v
end
end
return p._main(args)
end
function p._main(args, cfg)
local modules = mTableTools.compressSparseArray(args)
local box = p.renderBox(modules, cfg, args)
local trackingCategories = p.renderTrackingCategories(args, modules, nil, cfg)
return box .. trackingCategories
end
function p.renderBox(modules, cfg, args)
local boxArgs = {}
if #modules < 1 then
cfg = cfg or getConfig()
if cfg['allow_wishes'] or yesno(args and args.wish) then
boxArgs.text = format('wishtext')
else
boxArgs.text = string.format('<strong class="error">%s</strong>', format('error_emptylist'))
end
else
local moduleLinks = {}
for i, module in ipairs(modules) do
moduleLinks[i] = string.format('[[:%s]]', module)
end
local moduleList = mList.makeList('bulleted', moduleLinks)
boxArgs.text = format('header') .. '\n' .. moduleList
end
boxArgs.type = 'notice'
boxArgs.small = true
boxArgs.image = string.format(
'[[File:Lua-logo-nolabel.svg|30px|alt=%s|link=%s]]',
format('logo_alt'),
format('logo_link')
)
return mMessageBox.main('mbox', boxArgs)
end
function p.renderTrackingCategories(args, modules, titleObj, cfg)
if yesno(args.nocat) then
return ''
end
cfg = cfg or getConfig()
local cats = {}
-- Error category
if #modules < 1 and not (cfg['allow_wishes'] or yesno(args.wish)) and cfg['error_category'] then
cats[#cats + 1] = cfg['error_category']
end
-- Lua templates category
titleObj = titleObj or mw.title.getCurrentTitle()
if titleObj.namespace == 10
and not cfg['subpage_blacklist'][titleObj.subpageText]
then
local category = args.category
if not category then
local pagename = modules[1] and mw.title.new(modules[1])
category = pagename and cfg['module_categories'][pagename.text]
if not category then
if (cfg['allow_wishes'] or yesno(args.wish)) and #modules < 1 then
category = cfg['wish_category']
else
category = cfg['default_category']
end
end
end
if category then
cats[#cats + 1] = category
end
end
for i, cat in ipairs(cats) do
cats[i] = string.format('[[Category:%s]]', cat)
end
return table.concat(cats)
end
return p
4b55b48bd92caeb84decde5f14c77b68ae09653e
Module:List
828
19
25
2023-03-15T21:47:53Z
Ancyker
1
Created page with "-- This module outputs different kinds of lists. At the moment, bulleted, -- unbulleted, horizontal, ordered, and horizontal ordered lists are supported. local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, ar..."
Scribunto
text/plain
-- This module outputs different kinds of lists. At the moment, bulleted,
-- unbulleted, horizontal, ordered, and horizontal ordered lists are supported.
local libUtil = require('libraryUtil')
local checkType = libUtil.checkType
local mTableTools = require('Module:TableTools')
local p = {}
local listTypes = {
['bulleted'] = true,
['unbulleted'] = true,
['horizontal'] = true,
['ordered'] = true,
['horizontal_ordered'] = true
}
function p.makeListData(listType, args)
-- Constructs a data table to be passed to p.renderList.
local data = {}
-- Classes
data.classes = {}
data.templatestyles = ''
if listType == 'horizontal' or listType == 'horizontal_ordered' then
table.insert(data.classes, 'hlist')
data.templatestyles = mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = 'Flatlist/styles.css' }
}
elseif listType == 'unbulleted' then
table.insert(data.classes, 'plainlist')
data.templatestyles = mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = 'Plainlist/styles.css' }
}
end
table.insert(data.classes, args.class)
-- Main div style
data.style = args.style
-- Indent for horizontal lists
if listType == 'horizontal' or listType == 'horizontal_ordered' then
local indent = tonumber(args.indent)
indent = indent and indent * 1.6 or 0
if indent > 0 then
data.marginLeft = indent .. 'em'
end
end
-- List style types for ordered lists
-- This could be "1, 2, 3", "a, b, c", or a number of others. The list style
-- type is either set by the "type" attribute or the "list-style-type" CSS
-- property.
if listType == 'ordered' or listType == 'horizontal_ordered' then
data.listStyleType = args.list_style_type or args['list-style-type']
data.type = args['type']
-- Detect invalid type attributes and attempt to convert them to
-- list-style-type CSS properties.
if data.type
and not data.listStyleType
and not tostring(data.type):find('^%s*[1AaIi]%s*$')
then
data.listStyleType = data.type
data.type = nil
end
end
-- List tag type
if listType == 'ordered' or listType == 'horizontal_ordered' then
data.listTag = 'ol'
else
data.listTag = 'ul'
end
-- Start number for ordered lists
data.start = args.start
if listType == 'horizontal_ordered' then
-- Apply fix to get start numbers working with horizontal ordered lists.
local startNum = tonumber(data.start)
if startNum then
data.counterReset = 'listitem ' .. tostring(startNum - 1)
end
end
-- List style
-- ul_style and ol_style are included for backwards compatibility. No
-- distinction is made for ordered or unordered lists.
data.listStyle = args.list_style
-- List items
-- li_style is included for backwards compatibility. item_style was included
-- to be easier to understand for non-coders.
data.itemStyle = args.item_style or args.li_style
data.items = {}
for i, num in ipairs(mTableTools.numKeys(args)) do
local item = {}
item.content = args[num]
item.style = args['item' .. tostring(num) .. '_style']
or args['item_style' .. tostring(num)]
item.value = args['item' .. tostring(num) .. '_value']
or args['item_value' .. tostring(num)]
table.insert(data.items, item)
end
return data
end
function p.renderList(data)
-- Renders the list HTML.
-- Return the blank string if there are no list items.
if type(data.items) ~= 'table' or #data.items < 1 then
return ''
end
-- Render the main div tag.
local root = mw.html.create((
#data.classes > 0
or data.marginLeft
or data.style
) and 'div' or nil)
for i, class in ipairs(data.classes or {}) do
root:addClass(class)
end
root:css{['margin-left'] = data.marginLeft}
if data.style then
root:cssText(data.style)
end
-- Render the list tag.
local list = root:tag(data.listTag or 'ul')
list
:attr{start = data.start, type = data.type}
:css{
['counter-reset'] = data.counterReset,
['list-style-type'] = data.listStyleType
}
if data.listStyle then
list:cssText(data.listStyle)
end
-- Render the list items
for i, t in ipairs(data.items or {}) do
local item = list:tag('li')
if data.itemStyle then
item:cssText(data.itemStyle)
end
if t.style then
item:cssText(t.style)
end
item
:attr{value = t.value}
:wikitext(t.content)
end
return data.templatestyles .. tostring(root)
end
function p.makeList(listType, args)
if not listType or not listTypes[listType] then
error(string.format(
"bad argument #1 to 'makeList' ('%s' is not a valid list type)",
tostring(listType)
), 2)
end
checkType('makeList', 2, args, 'table')
local data = p.makeListData(listType, args)
return p.renderList(data)
end
for listType in pairs(listTypes) do
p[listType] = function (frame)
local mArguments = require('Module:Arguments')
local origArgs = mArguments.getArgs(frame)
-- Copy all the arguments to a new table, for faster indexing.
local args = {}
for k, v in pairs(origArgs) do
args[k] = v
end
return p.makeList(listType, args)
end
end
return p
d701c0798e541793aa5ed1e9af50fc3b20548907
Module:TableTools
828
20
26
2023-03-15T21:48:33Z
Ancyker
1
Created page with "--[[ ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should -- -- not be called directly from #invoke...."
Scribunto
text/plain
--[[
------------------------------------------------------------------------------------
-- TableTools --
-- --
-- This module includes a number of functions for dealing with Lua tables. --
-- It is a meta-module, meant to be called from other Lua modules, and should --
-- not be called directly from #invoke. --
------------------------------------------------------------------------------------
--]]
local libraryUtil = require('libraryUtil')
local p = {}
-- Define often-used variables and functions.
local floor = math.floor
local infinity = math.huge
local checkType = libraryUtil.checkType
local checkTypeMulti = libraryUtil.checkTypeMulti
--[[
------------------------------------------------------------------------------------
-- isPositiveInteger
--
-- This function returns true if the given value is a positive integer, and false
-- if not. Although it doesn't operate on tables, it is included here as it is
-- useful for determining whether a given table key is in the array part or the
-- hash part of a table.
------------------------------------------------------------------------------------
--]]
function p.isPositiveInteger(v)
if type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity then
return true
else
return false
end
end
--[[
------------------------------------------------------------------------------------
-- isNan
--
-- This function returns true if the given number is a NaN value, and false
-- if not. Although it doesn't operate on tables, it is included here as it is
-- useful for determining whether a value can be a valid table key. Lua will
-- generate an error if a NaN is used as a table key.
------------------------------------------------------------------------------------
--]]
function p.isNan(v)
if type(v) == 'number' and tostring(v) == '-nan' then
return true
else
return false
end
end
--[[
------------------------------------------------------------------------------------
-- shallowClone
--
-- This returns a clone of a table. The value returned is a new table, but all
-- subtables and functions are shared. Metamethods are respected, but the returned
-- table will have no metatable of its own.
------------------------------------------------------------------------------------
--]]
function p.shallowClone(t)
local ret = {}
for k, v in pairs(t) do
ret[k] = v
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- removeDuplicates
--
-- This removes duplicate values from an array. Non-positive-integer keys are
-- ignored. The earliest value is kept, and all subsequent duplicate values are
-- removed, but otherwise the array order is unchanged.
------------------------------------------------------------------------------------
--]]
function p.removeDuplicates(t)
checkType('removeDuplicates', 1, t, 'table')
local isNan = p.isNan
local ret, exists = {}, {}
for i, v in ipairs(t) do
if isNan(v) then
-- NaNs can't be table keys, and they are also unique, so we don't need to check existence.
ret[#ret + 1] = v
else
if not exists[v] then
ret[#ret + 1] = v
exists[v] = true
end
end
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- numKeys
--
-- This takes a table and returns an array containing the numbers of any numerical
-- keys that have non-nil values, sorted in numerical order.
------------------------------------------------------------------------------------
--]]
function p.numKeys(t)
checkType('numKeys', 1, t, 'table')
local isPositiveInteger = p.isPositiveInteger
local nums = {}
for k, v in pairs(t) do
if isPositiveInteger(k) then
nums[#nums + 1] = k
end
end
table.sort(nums)
return nums
end
--[[
------------------------------------------------------------------------------------
-- affixNums
--
-- This takes a table and returns an array containing the numbers of keys with the
-- specified prefix and suffix. For example, for the table
-- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will
-- return {1, 3, 6}.
------------------------------------------------------------------------------------
--]]
function p.affixNums(t, prefix, suffix)
checkType('affixNums', 1, t, 'table')
checkType('affixNums', 2, prefix, 'string', true)
checkType('affixNums', 3, suffix, 'string', true)
local function cleanPattern(s)
-- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally.
s = s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1')
return s
end
prefix = prefix or ''
suffix = suffix or ''
prefix = cleanPattern(prefix)
suffix = cleanPattern(suffix)
local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$'
local nums = {}
for k, v in pairs(t) do
if type(k) == 'string' then
local num = mw.ustring.match(k, pattern)
if num then
nums[#nums + 1] = tonumber(num)
end
end
end
table.sort(nums)
return nums
end
--[[
------------------------------------------------------------------------------------
-- numData
--
-- Given a table with keys like ("foo1", "bar1", "foo2", "baz2"), returns a table
-- of subtables in the format
-- { [1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'} }
-- Keys that don't end with an integer are stored in a subtable named "other".
-- The compress option compresses the table so that it can be iterated over with
-- ipairs.
------------------------------------------------------------------------------------
--]]
function p.numData(t, compress)
checkType('numData', 1, t, 'table')
checkType('numData', 2, compress, 'boolean', true)
local ret = {}
for k, v in pairs(t) do
local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$')
if num then
num = tonumber(num)
local subtable = ret[num] or {}
if prefix == '' then
-- Positional parameters match the blank string; put them at the start of the subtable instead.
prefix = 1
end
subtable[prefix] = v
ret[num] = subtable
else
local subtable = ret.other or {}
subtable[k] = v
ret.other = subtable
end
end
if compress then
local other = ret.other
ret = p.compressSparseArray(ret)
ret.other = other
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- compressSparseArray
--
-- This takes an array with one or more nil values, and removes the nil values
-- while preserving the order, so that the array can be safely traversed with
-- ipairs.
------------------------------------------------------------------------------------
--]]
function p.compressSparseArray(t)
checkType('compressSparseArray', 1, t, 'table')
local ret = {}
local nums = p.numKeys(t)
for _, num in ipairs(nums) do
ret[#ret + 1] = t[num]
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- sparseIpairs
--
-- This is an iterator for sparse arrays. It can be used like ipairs, but can
-- handle nil values.
------------------------------------------------------------------------------------
--]]
function p.sparseIpairs(t)
checkType('sparseIpairs', 1, t, 'table')
local nums = p.numKeys(t)
local i = 0
local lim = #nums
return function ()
i = i + 1
if i <= lim then
local key = nums[i]
return key, t[key]
else
return nil, nil
end
end
end
--[[
------------------------------------------------------------------------------------
-- size
--
-- This returns the size of a key/value pair table. It will also work on arrays,
-- but for arrays it is more efficient to use the # operator.
------------------------------------------------------------------------------------
--]]
function p.size(t)
checkType('size', 1, t, 'table')
local i = 0
for k in pairs(t) do
i = i + 1
end
return i
end
local function defaultKeySort(item1, item2)
-- "number" < "string", so numbers will be sorted before strings.
local type1, type2 = type(item1), type(item2)
if type1 ~= type2 then
return type1 < type2
else -- This will fail with table, boolean, function.
return item1 < item2
end
end
--[[
Returns a list of the keys in a table, sorted using either a default
comparison function or a custom keySort function.
]]
function p.keysToList(t, keySort, checked)
if not checked then
checkType('keysToList', 1, t, 'table')
checkTypeMulti('keysToList', 2, keySort, { 'function', 'boolean', 'nil' })
end
local list = {}
local index = 1
for key, value in pairs(t) do
list[index] = key
index = index + 1
end
if keySort ~= false then
keySort = type(keySort) == 'function' and keySort or defaultKeySort
table.sort(list, keySort)
end
return list
end
--[[
Iterates through a table, with the keys sorted using the keysToList function.
If there are only numerical keys, sparseIpairs is probably more efficient.
]]
function p.sortedPairs(t, keySort)
checkType('sortedPairs', 1, t, 'table')
checkType('sortedPairs', 2, keySort, 'function', true)
local list = p.keysToList(t, keySort, true)
local i = 0
return function()
i = i + 1
local key = list[i]
if key ~= nil then
return key, t[key]
else
return nil, nil
end
end
end
--[[
Returns true if all keys in the table are consecutive integers starting at 1.
--]]
function p.isArray(t)
checkType("isArray", 1, t, "table")
local i = 0
for k, v in pairs(t) do
i = i + 1
if t[i] == nil then
return false
end
end
return true
end
-- { "a", "b", "c" } -> { a = 1, b = 2, c = 3 }
function p.invert(array)
checkType("invert", 1, array, "table")
local map = {}
for i, v in ipairs(array) do
map[v] = i
end
return map
end
--[[
{ "a", "b", "c" } -> { ["a"] = true, ["b"] = true, ["c"] = true }
--]]
function p.listToSet(t)
checkType("listToSet", 1, t, "table")
local set = {}
for _, item in ipairs(t) do
set[item] = true
end
return set
end
--[[
Recursive deep copy function.
Preserves identities of subtables.
]]
local function _deepCopy(orig, includeMetatable, already_seen)
-- Stores copies of tables indexed by the original table.
already_seen = already_seen or {}
local copy = already_seen[orig]
if copy ~= nil then
return copy
end
if type(orig) == 'table' then
copy = {}
for orig_key, orig_value in pairs(orig) do
copy[deepcopy(orig_key, includeMetatable, already_seen)] = deepcopy(orig_value, includeMetatable, already_seen)
end
already_seen[orig] = copy
if includeMetatable then
local mt = getmetatable(orig)
if mt ~= nil then
local mt_copy = deepcopy(mt, includeMetatable, already_seen)
setmetatable(copy, mt_copy)
already_seen[mt] = mt_copy
end
end
else -- number, string, boolean, etc
copy = orig
end
return copy
end
function p.deepCopy(orig, noMetatable, already_seen)
checkType("deepCopy", 3, already_seen, "table", true)
return _deepCopy(orig, not noMetatable, already_seen)
end
--[[
Concatenates all values in the table that are indexed by a number, in order.
sparseConcat{ a, nil, c, d } => "acd"
sparseConcat{ nil, b, c, d } => "bcd"
]]
function p.sparseConcat(t, sep, i, j)
local list = {}
local list_i = 0
for _, v in p.sparseIpairs(t) do
list_i = list_i + 1
list[list_i] = v
end
return table.concat(list, sep, i, j)
end
--[[
-- This returns the length of a table, or the first integer key n counting from
-- 1 such that t[n + 1] is nil. It is similar to the operator #, but may return
-- a different value when there are gaps in the array portion of the table.
-- Intended to be used on data loaded with mw.loadData. For other tables, use #.
-- Note: #frame.args in frame object always be set to 0, regardless of
-- the number of unnamed template parameters, so use this function for
-- frame.args.
--]]
function p.length(t)
local i = 1
while t[i] ~= nil do
i = i + 1
end
return i - 1
end
function p.inArray(arr, valueToFind)
checkType("inArray", 1, arr, "table")
-- if valueToFind is nil, error?
for _, v in ipairs(arr) do
if v == valueToFind then
return true
end
end
return false
end
return p
fe918509f168332267834b3a6f5c219a9de5b2e7
Module:Lua banner/config
828
21
27
2023-03-15T21:49:22Z
Ancyker
1
Created page with "local cfg = {} -- Don’t touch this line. -- Subpage blacklist: these subpages will not be categorized (except for the -- error category, which is always added if there is an error). -- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have -- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules, -- so they *will* have categories. All rules should be in the -- ['<subpage name>'] = true, -- format. cfg['subpa..."
Scribunto
text/plain
local cfg = {} -- Don’t touch this line.
-- Subpage blacklist: these subpages will not be categorized (except for the
-- error category, which is always added if there is an error).
-- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have
-- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules,
-- so they *will* have categories. All rules should be in the
-- ['<subpage name>'] = true,
-- format.
cfg['subpage_blacklist'] = {
['doc'] = true,
['sandbox'] = true,
['sandbox2'] = true,
['testcases'] = true,
}
-- Allow wishes: whether wishes for conversion to Lua are allowed.
-- If true, calls with zero parameters are valid, and considered to be wishes:
-- The box’s text is “This template should use Lua”, and cfg['wish_category'] is
-- added. If false, such calls are invalid, an error message appears, and
-- cfg['error_category'] is added.
cfg['allow_wishes'] = false
-- Default category: this category is added if the module call contains errors
-- (e.g. no module listed). A category name without namespace, or nil
-- to disable categorization (not recommended).
cfg['error_category'] = 'Lua templates with errors'
-- Wish category: this category is added if no module is listed, and wishes are
-- allowed. (Not used if wishes are not allowed.) A category name without
-- namespace, or nil to disable categorization.
cfg['wish_category'] = 'Lua-candidates'
-- Default category: this category is added if none of the below module_categories
-- matches the first module listed. A category name without namespace, or nil
-- to disable categorization.
cfg['default_category'] = 'Lua-based templates'
-- Module categories: one of these categories is added if the first listed module
-- is the listed module (e.g. {{Lua|Module:String}} adds
-- [[Category:Lua String-based templates]].) Format:
-- ['<module name>'] = '<category name>'
-- where neither <module name> nor <category name> contains namespace. An empty
-- table (i.e. no module-based categorization) will suffice on smaller wikis.
cfg['module_categories'] = {
['String'] = 'Lua String-based templates',
}
return cfg -- Don’t touch this line.
960aa5bb0f008cf7e3ef37963e1dbc797c2ffdd5
Template:Documentation
10
22
28
2023-03-15T21:52:48Z
Ancyker
1
Created page with "<noinclude> <languages/> </noinclude><includeonly>{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}</includeonly><noinclude> {{documentation|content= {{Lua|Module:Documentation}} <translate><!--T:12--> This template automatically displays a documentation box like the one you are seeing now, of which the content is sometimes transcluded from another page.</translate> <translate><!--T:13--> It is intended for pages which are <tvar name=..."
wikitext
text/x-wiki
<noinclude>
<languages/>
</noinclude><includeonly>{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}</includeonly><noinclude>
{{documentation|content=
{{Lua|Module:Documentation}}
<translate><!--T:12--> This template automatically displays a documentation box like the one you are seeing now, of which the content is sometimes transcluded from another page.</translate>
<translate><!--T:13--> It is intended for pages which are [[<tvar name=1>Special:MyLanguage/Help:Transclusion</tvar>|transcluded]] in other pages, i.e. templates, whether in the template namespace or not.</translate>
<translate>
==Usage== <!--T:2-->
===Customizing display=== <!--T:3-->
<!--T:4-->
Overrides exist to customize the output in special cases:
</translate>
* <nowiki>{{</nowiki>documentation{{!}}'''heading'''=<nowiki>}}</nowiki> - <translate><!--T:5--> change the text of the "documentation" heading.</translate> <translate><!--T:10--> If this is set to blank, the entire heading line (including the first [edit] link) will also disappear.</translate>
<translate>
==Rationale== <!--T:6-->
</translate>
<translate><!--T:7--> This template allows any page to use any documentation page, and makes it possible to protect templates while allowing anyone to edit the template's documentation and categories.</translate>
<translate><!--T:8--> It also reduces server resources by circumventing a [[w:Wikipedia:Template limits|technical limitation of templates]] (see a [[<tvar name=1>:en:Special:Diff/69888944</tvar>|developer's explanation]]).</translate>
<translate>
==See also== <!--T:9-->
</translate>
* <translate><!--T:14--> [[w:Template:Documentation subpage]]</translate>
* {{tim|Documentation}}
* <translate><!--T:11--> [[w:Wikipedia:Template documentation]]</translate>
}}
[[Category:Formatting templates{{#translation:}}|Template documentation]]
[[Category:Template documentation{{#translation:}}| ]]
</noinclude><includeonly>{{#if:{{{content|}}}|
[[Category:Template documentation pages{{#translation:}}]]
}}</includeonly>
e9a25c87d40f5882dd425c83ed4d3be628082f3c
Template:Mbox
10
23
29
2023-03-15T21:53:11Z
Ancyker
1
Created page with "{{#invoke:Message box|mbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>"
wikitext
text/x-wiki
{{#invoke:Message box|mbox}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
c262e205f85f774a23f74119179ceea11751d68e
Template:File other
10
24
30
2023-03-15T21:54:10Z
Ancyker
1
Created page with "{{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:6}} | file | other }} }} | file | image = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{Documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude>"
wikitext
text/x-wiki
{{#switch:
<!--If no or empty "demospace" parameter then detect namespace-->
{{#if:{{{demospace|}}}
| {{lc: {{{demospace}}} }} <!--Use lower case "demospace"-->
| {{#ifeq:{{NAMESPACE}}|{{ns:6}}
| file
| other
}}
}}
| file
| image = {{{1|}}}
| other
| #default = {{{2|}}}
}}<!--End switch--><noinclude>
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
0ae5bdb15fbe55f5787d00f85a443e4eac787c5e
Template:Image other
10
25
31
2023-03-15T21:54:39Z
Ancyker
1
Redirected page to [[Template:File other]]
wikitext
text/x-wiki
#REDIRECT [[Template:File other]]
e8788a1d73cfea49d315edcf46f536fe8a69de5e
Module:Int
828
26
32
2023-03-15T21:55:24Z
Ancyker
1
Created page with "-- This is a helper module for [[Template:int]] local templateTranslation = require('Module:Template translation') local this = {} function this.renderIntMessage(frame) local args = frame.args local pargs = (frame:getParent() or {}).args local arguments = {} for k, v in pairs(pargs) do local n = tonumber(k) or 0 if (n >= 2) then arguments[n - 1] = mw.text.trim(v) end end local lang if args.lang and args.lang ~= '' and mw.language.isValidCode(args.lang)..."
Scribunto
text/plain
-- This is a helper module for [[Template:int]]
local templateTranslation = require('Module:Template translation')
local this = {}
function this.renderIntMessage(frame)
local args = frame.args
local pargs = (frame:getParent() or {}).args
local arguments = {}
for k, v in pairs(pargs) do
local n = tonumber(k) or 0
if (n >= 2) then
arguments[n - 1] = mw.text.trim(v)
end
end
local lang
if args.lang and args.lang ~= '' and mw.language.isValidCode(args.lang) then
lang = args.lang
else
lang = templateTranslation.getLanguage()
end
local msg = mw.message.new(mw.text.trim(args[1]), arguments):inLanguage(lang)
if msg:exists() or lang == 'qqx' then
if msg:isDisabled() then
return args.missing or ''
else
local msgstr = msg:plain()
return frame:preprocess(msgstr)
end
else
return args.missing ~= ''
and args.missing
or '⧼' .. args[1] .. '⧽'
end
end
return this
8bd789d31d4f269e575c5806864031420e6a5c86
Template:Int
10
27
33
2023-03-15T21:55:37Z
Ancyker
1
Created page with "<onlyinclude>{{#invoke:Int|renderIntMessage|{{{1}}}|missing={{{missing|}}}|lang={{{lang|}}}}}</onlyinclude> {{Documentation}} <!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! -->"
wikitext
text/x-wiki
<onlyinclude>{{#invoke:Int|renderIntMessage|{{{1}}}|missing={{{missing|}}}|lang={{{lang|}}}}}</onlyinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! -->
33458d205943740a9f820054cc2950d639a84aa6
MediaWiki:Wm-license-gpl-text/en
8
28
34
2023-03-15T21:57:45Z
Ancyker
1
Created page with "This work is [[{{int:wm-license-free-software-wiki-link}}|free software]]; you can redistribute it and/or modify it under the terms of the '''[[{{int:wm-license-gpl-wiki-link}}|GNU General Public License]]''' as published by the [[{{int:wm-license-fsf-wiki-link}}|Free Software Foundation]]; either version 2 of the License, or any later version. This work is distributed in the hope that it will be useful, but '''without any warranty'''; without even the implied warranty o..."
wikitext
text/x-wiki
This work is [[{{int:wm-license-free-software-wiki-link}}|free software]]; you can redistribute it and/or modify it under the terms of the '''[[{{int:wm-license-gpl-wiki-link}}|GNU General Public License]]''' as published by the [[{{int:wm-license-fsf-wiki-link}}|Free Software Foundation]]; either version 2 of the License, or any later version. This work is distributed in the hope that it will be useful, but '''without any warranty'''; without even the implied warranty of '''merchantability''' or '''fitness for a particular purpose'''. See [{{int:wm-license-gpl-2-full-link}} version 2] and [{{int:wm-license-gpl-3-full-link}} version 3 of the GNU General Public License] for more details.
c72bbc177f2625546d97685ea01f239b4f2440c2
Template:GPL
10
29
35
2023-03-15T21:58:29Z
Ancyker
1
Created page with "{{Note start}} '''License:''' [[Wikipedia:en:GPL|GPL]] {{Note end}}"
wikitext
text/x-wiki
{{Note start}}
'''License:''' [[Wikipedia:en:GPL|GPL]]
{{Note end}}
c8d9b52915f2da6ce8ebdf4bb50d0284fe642dea
37
35
2023-03-15T22:03:51Z
Ancyker
1
wikitext
text/x-wiki
<noinclude>
<languages/>
</noinclude>{{#switch:<translate></translate>
| =
{{mbox
| class = licensetpl noviewer
| type = notice
| image = [[File:Heckert GNU white.svg|none|50px|<translate><!--T:4--> GNU head</translate>]]
| text = ''{{image other|{{int:Wm-license-gpl-text}}|{{int|Wm-license-gpl-text}}}}''<!--
--><span style="display:none;"><span class="licensetpl_short">GPLv2+</span><span class="licensetpl_long">GNU General Public License v2+</span><span class="licensetpl_link"><nowiki>http</nowiki>://www.gnu.org/copyleft/gpl.html</span></span>
}}<includeonly>{{image other|[[Category:GPL images|{{PAGENAME}}]]}}</includeonly>
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:GPL|noshift=1|uselang={{image other|{{int:lang}}|{{PAGELANGUAGE}}}}}}
}}<noinclude>
{{documentation|Template:GPL/doc}}
</noinclude>
cc57bdbad2ca465ddfb30e81d8e053effa44d367
Template:Note
10
30
36
2023-03-15T22:01:13Z
Ancyker
1
Created page with "<languages/> <onlyinclude>{{#if: {{#if:{{{1|{{{text|}}}}}}|{{{1|{{{text|}}}}}}|{{#if:<noinclude>demo</noinclude>|demo|{{{demo|}}}}} }} | <templatestyles src="Note/styles.css" /><div role="note" class="note note-{{#switch: {{{2|{{{type|}}}}}} |gotcha=error |=info |#default={{{2|{{{type|}}}}}} }} {{#ifeq:{{{inline|}}}|1|note-inline}}">{{{1|{{{text}}}}}}</div> | [[File:OOjs UI icon lightbulb-20 fc3.svg|18px|alt=<translate><!--T:1--> Note</translate>|link=]..."
wikitext
text/x-wiki
<languages/>
<onlyinclude>{{#if: {{#if:{{{1|{{{text|}}}}}}|{{{1|{{{text|}}}}}}|{{#if:<noinclude>demo</noinclude>|demo|{{{demo|}}}}} }} | <templatestyles src="Note/styles.css" /><div role="note" class="note note-{{#switch: {{{2|{{{type|}}}}}}
|gotcha=error
|=info
|#default={{{2|{{{type|}}}}}}
}} {{#ifeq:{{{inline|}}}|1|note-inline}}">{{{1|{{{text}}}}}}</div>
| [[File:OOjs UI icon lightbulb-20 fc3.svg|18px|alt=<translate><!--T:1--> Note</translate>|link=]] '''<translate><!--T:2--> Note:</translate>''' }}<!--
--></onlyinclude>
{{documentation|content=
<translate>
== Usage == <!--T:3-->
</translate>
<pre>
{{Note|Foo}}
{{Note|Foo|info}}
{{Note|Foo|reminder}}
{{Note|Foo|warn}}
{{Note|Foo|error}}
{{Note}} <translate nowrap><!--T:6--> Loose test</translate>
* Text {{Note|Foo|inline=1}}
</pre>
{{Note|Foo}}
{{Note|Foo|info}}
{{Note|Foo|reminder}}
{{Note|Foo|warn}}
{{Note|Foo|error}}
{{Note}} <translate><!--T:4--> Loose test</translate>
* Text {{Note|Foo|inline=1}}
== Parameters ==
{{Note/doc}}
}}
[[Category:Templates{{#translation:}}|{{PAGENAME}}]]
2b46cee3613e13da738ac1e7412a6312de44d555
MediaWiki:Wm-license-gpl-2-full-link/qqq
8
32
39
2023-03-15T22:11:39Z
Ancyker
1
Created page with "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
wikitext
text/x-wiki
https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
e9a42f239826c32d527b64ba3510b7ea930c5661
MediaWiki:Wm-license-gpl-2-full-link
8
33
40
2023-03-15T22:12:39Z
Ancyker
1
Created page with "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
wikitext
text/x-wiki
https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
e9a42f239826c32d527b64ba3510b7ea930c5661
MediaWiki:Wm-license-gpl-3-full-link
8
34
41
2023-03-15T22:13:32Z
Ancyker
1
Created page with "https://www.gnu.org/copyleft/gpl-3.0.html"
wikitext
text/x-wiki
https://www.gnu.org/copyleft/gpl-3.0.html
a66ac4aabe86aee3338b8696ab70857e34bdf9c8
MediaWiki:Wm-license-free-software-wiki-link
8
35
42
2023-03-15T22:14:23Z
Ancyker
1
Created page with "w:en:Free software"
wikitext
text/x-wiki
w:en:Free software
6103a96efe52ed1c428380256566a1e57fed3863
MediaWiki:Wm-license-gpl-wiki-link
8
36
43
2023-03-15T22:35:43Z
Ancyker
1
Created page with "w:en:GNU General Public License"
wikitext
text/x-wiki
w:en:GNU General Public License
a83ffd437d1a73bb3d9e71e9b41109f7dc06a233
MediaWiki:Wm-license-fsf-wiki-link
8
37
44
2023-03-15T22:36:25Z
Ancyker
1
Created page with "w:en:Free Software Foundation"
wikitext
text/x-wiki
w:en:Free Software Foundation
58072495f2ddb872c447ba2af7c70b8fda48baa7
MediaWiki:Wm-license-gpl-text
8
38
45
2023-03-15T22:37:26Z
Ancyker
1
Created page with "This work is [[{{int:wm-license-free-software-wiki-link}}|free software]]; you can redistribute it and/or modify it under the terms of the '''[[{{int:wm-license-gpl-wiki-link}}|GNU General Public License]]''' as published by the [[{{int:wm-license-fsf-wiki-link}}|Free Software Foundation]]; either version 2 of the License, or any later version. This work is distributed in the hope that it will be useful, but '''without any warranty'''; without even the implied warranty o..."
wikitext
text/x-wiki
This work is [[{{int:wm-license-free-software-wiki-link}}|free software]]; you can redistribute it and/or modify it under the terms of the '''[[{{int:wm-license-gpl-wiki-link}}|GNU General Public License]]''' as published by the [[{{int:wm-license-fsf-wiki-link}}|Free Software Foundation]]; either version 2 of the License, or any later version. This work is distributed in the hope that it will be useful, but '''without any warranty'''; without even the implied warranty of '''merchantability''' or '''fitness for a particular purpose'''. See [{{int:wm-license-gpl-2-full-link}} version 2] and [{{int:wm-license-gpl-3-full-link}} version 3 of the GNU General Public License] for more details.
c72bbc177f2625546d97685ea01f239b4f2440c2
Template:GPL/doc
10
39
46
2023-03-15T22:43:23Z
Ancyker
1
Created page with "{{Documentation subpage}} <!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> <templatedata> { "description": { "en": "This template indicates that a work (usually a file) is published under the GNU General Public License.", "cs": "Tato šablona označuje, že dílo (obvykle soubor) je publikováno pod GNU General Public License.", "fr": "Ce modèle indique qu'un travail (en général un fichier) est publié sous licence publique GNU."..."
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
<templatedata>
{
"description": {
"en": "This template indicates that a work (usually a file) is published under the GNU General Public License.",
"cs": "Tato šablona označuje, že dílo (obvykle soubor) je publikováno pod GNU General Public License.",
"fr": "Ce modèle indique qu'un travail (en général un fichier) est publié sous licence publique GNU."
},
"params": {}
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- Categories go here and interwikis go in Wikidata. -->
[[Category:License templates{{#translation:}}]]
[[Category:File namespace templates{{#translation:}}]]
}}</includeonly>
d40e123fa8e060798fe57316cada6f232ed2442a
Template:Documentation subpage
10
40
47
2023-03-15T22:44:14Z
Ancyker
1
Created page with "<noinclude> <languages/> </noinclude>{{#switch:<translate></translate> | = <includeonly><!-- -->{{#if:{{IsDocSubpage|override={{{override|doc}}}|false=}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:OOjs UI icon book-ltr.svg|40px|alt=|link=]]..."
wikitext
text/x-wiki
<noinclude>
<languages/>
</noinclude>{{#switch:<translate></translate>
| =
<includeonly><!--
-->{{#if:{{IsDocSubpage|override={{{override|doc}}}|false=}}
| <!--(this template has been transcluded on a /doc or /{{{override}}} page)-->
</includeonly><!--
-->{{#ifeq:{{{doc-notice|show}}} |show
| {{Mbox
| type = notice
| style = margin-bottom:1.0em;
| image = [[File:OOjs UI icon book-ltr.svg|40px|alt=|link=]]
| text =
'''<translate><!--T:4--> This is a [[w:Wikipedia:Template documentation|documentation]] [[<tvar name=2>Special:MyLanguage/Help:Subpages</tvar>|subpage]] for <tvar name=1>{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}</tvar>.</translate>'''<br /><!--
-->{{#if:{{{text2|}}}{{{text1|}}}
|<translate><!--T:5--> It contains usage information, [[<tvar name=7>Special:MyLanguage/Help:Categories</tvar>|categories]] and other content that is not part of the original <tvar name=1>{{{text2|{{{text1}}}}}}</tvar>.</translate>
|<translate><!--T:10--> It contains usage information, [[<tvar name=7>Special:MyLanguage/Help:Categories</tvar>|categories]] and other content that is not part of the original <tvar name=1>{{SUBJECTSPACE}}</tvar> page.</translate>
}}
}}
}}<!--
-->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!--
-->{{#if:{{{inhibit|}}} |<!--(don't categorize)-->
| <includeonly><!--
-->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}
| [[Category:{{#switch:{{SUBJECTSPACE}}
| Template | Project = Template
| Module = Module
| User = User
| #default = MediaWiki
}} documentation pages{{#translation:}}]]
| [[Category:Documentation subpages without corresponding pages{{#translation:}}]]
}}<!--
--></includeonly>
}}<!--
(completing initial #ifeq: at start of template:)
--><includeonly>
| <!--(this template has not been transcluded on a /doc or /{{{override}}} page)-->
}}<!--
--></includeonly>
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:Documentation subpage|noshift=1|uselang={{int:lang}}}}
}}<noinclude>
{{Documentation|content=
<translate>
== Usage == <!--T:6-->
<!--T:7-->
Use this template on Template Documentation subpage (/doc).
== See also == <!--T:8-->
</translate>
*{{tl|Documentation}}
*{{tl|tl}}
}}
</noinclude>
0d6a10a903dbd572fffeb01aff5983d9b3abc65c
Template:Tl
10
41
48
2023-03-15T22:47:50Z
Ancyker
1
Created page with "{{((}}[[Template:{{{1}}}|{{{1}}}]]{{))}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude>"
wikitext
text/x-wiki
{{((}}[[Template:{{{1}}}|{{{1}}}]]{{))}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
1447a15b7ca7f93848d1ac4b792d61a1d8555e3b
Template:((
10
42
49
2023-03-15T22:54:10Z
Ancyker
1
Created page with "{{"
wikitext
text/x-wiki
{{
09343c85545555efc31e6e70b7ea7dcadf854930
52
49
2023-03-15T22:54:58Z
Ancyker
1
wikitext
text/x-wiki
{{<noinclude>
{{documentation}}[[Category:Workaround templates]]
</noinclude>
f8c63100e113b89d20396b75811d33e13b808f1a
Template:))
10
43
50
2023-03-15T22:54:23Z
Ancyker
1
Created page with "}}"
wikitext
text/x-wiki
}}
482e90cb1adaf93f59b583ac06936515412a4319
51
50
2023-03-15T22:54:33Z
Ancyker
1
wikitext
text/x-wiki
}}<noinclude>
{{documentation}}[[Category:Workaround templates]]
</noinclude>
e2331ab1b2f6b7061b29f929a502a016b6d54a54
Translations:Template:Documentation subpage/Page display title/en
1198
44
53
2023-03-15T23:00:02Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
Template:Documentation subpage
89179711bbeb2f48127e2bd6f081cb4ad57429a3
Translations:Template:Documentation subpage/4/en
1198
45
54
2023-03-15T23:00:02Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
This is a [[w:Wikipedia:Template documentation|documentation]] [[$2|subpage]] for $1.
a716aa1090b60f09a91b6829ca666da5671d947a
Translations:Template:Documentation subpage/5/en
1198
46
55
2023-03-15T23:00:02Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
It contains usage information, [[$7|categories]] and other content that is not part of the original $1.
e504ff149deaf118bb340afe599e2fad2d8d0da7
Translations:Template:Documentation subpage/10/en
1198
47
56
2023-03-15T23:00:02Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
It contains usage information, [[$7|categories]] and other content that is not part of the original $1 page.
7b5849c26dcdfd4002e5035b920e13b4848d8950
Translations:Template:Documentation subpage/6/en
1198
48
57
2023-03-15T23:00:02Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
== Usage ==
b2af31755a68f64efab013a66d4b058e98804ad6
Translations:Template:Documentation subpage/7/en
1198
49
58
2023-03-15T23:00:02Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
Use this template on Template Documentation subpage (/doc).
2d89f172b52af08272685ca2b64ac58009f3a793
Translations:Template:Documentation subpage/8/en
1198
50
59
2023-03-15T23:00:02Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
== See also ==
92b70cb23e832f253d94051159c2a1a536963815
Template:Documentation subpage/en
10
51
60
2023-03-15T23:00:10Z
FuzzyBot
5
Updating to match new version of source page
wikitext
text/x-wiki
<noinclude>
<languages/>
</noinclude>{{#switch:
| =
<includeonly><!--
-->{{#if:{{IsDocSubpage|override={{{override|doc}}}|false=}}
| <!--(this template has been transcluded on a /doc or /{{{override}}} page)-->
</includeonly><!--
-->{{#ifeq:{{{doc-notice|show}}} |show
| {{Mbox
| type = notice
| style = margin-bottom:1.0em;
| image = [[File:OOjs UI icon book-ltr.svg|40px|alt=|link=]]
| text =
'''This is a [[w:Wikipedia:Template documentation|documentation]] [[Special:MyLanguage/Help:Subpages|subpage]] for {{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}.'''<br /><!--
-->{{#if:{{{text2|}}}{{{text1|}}}
|It contains usage information, [[Special:MyLanguage/Help:Categories|categories]] and other content that is not part of the original {{{text2|{{{text1}}}}}}.
|It contains usage information, [[Special:MyLanguage/Help:Categories|categories]] and other content that is not part of the original {{SUBJECTSPACE}} page.
}}
}}
}}<!--
-->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!--
-->{{#if:{{{inhibit|}}} |<!--(don't categorize)-->
| <includeonly><!--
-->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}
| [[Category:{{#switch:{{SUBJECTSPACE}}
| Template | Project = Template
| Module = Module
| User = User
| #default = MediaWiki
}} documentation pages{{#translation:}}]]
| [[Category:Documentation subpages without corresponding pages{{#translation:}}]]
}}<!--
--></includeonly>
}}<!--
(completing initial #ifeq: at start of template:)
--><includeonly>
| <!--(this template has not been transcluded on a /doc or /{{{override}}} page)-->
}}<!--
--></includeonly>
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:Documentation subpage|noshift=1|uselang={{int:lang}}}}
}}<noinclude>
{{Documentation|content=
== Usage ==
Use this template on Template Documentation subpage (/doc).
== See also ==
*{{tl|Documentation}}
*{{tl|tl}}
}}
</noinclude>
7ed5cbfd5118b37933b2c38487c1ab00f969bf46
Translations:Template:Documentation subpage/4/nl
1198
52
61
2023-03-15T23:01:56Z
Ancyker
1
Created page with "Dit is een [[w:Wikipedia:Template documentation|documentatie]] [[$2|subpagina]] van $1."
wikitext
text/x-wiki
Dit is een [[w:Wikipedia:Template documentation|documentatie]] [[$2|subpagina]] van $1.
eda962c3a17338ea44161ec8126da8c12ac2cf69
Translations:Template:Documentation subpage/5/nl
1198
53
62
2023-03-15T23:02:17Z
Ancyker
1
Created page with "Het bevat informatie over het gebruik, [[$7|categorieën]] en andere inhoud die geen deel is van de originele $1."
wikitext
text/x-wiki
Het bevat informatie over het gebruik, [[$7|categorieën]] en andere inhoud die geen deel is van de originele $1.
62ea9ea5bf8c1d8644da603ff3852d1a46127c7b
Translations:Template:Documentation subpage/10/nl
1198
54
63
2023-03-15T23:02:24Z
Ancyker
1
Created page with "Het bevat informatie over het gebruik, [[$7|categorieën]] en andere inhoud die geen deel is van de originele pagina $1."
wikitext
text/x-wiki
Het bevat informatie over het gebruik, [[$7|categorieën]] en andere inhoud die geen deel is van de originele pagina $1.
45e303fd0e628488f259a0597a7c0b3893a11ec8
Translations:Template:Documentation subpage/6/nl
1198
55
64
2023-03-15T23:02:30Z
Ancyker
1
Created page with "== Gebruik =="
wikitext
text/x-wiki
== Gebruik ==
237e67fcb39741bef717df9a1198ba2914e6f173
Translations:Template:Documentation subpage/7/nl
1198
56
65
2023-03-15T23:02:37Z
Ancyker
1
Created page with "Gebruik dit sjabloon op de documentatie subpagina (/doc)."
wikitext
text/x-wiki
Gebruik dit sjabloon op de documentatie subpagina (/doc).
0e6e5a7a7a354d8ef9f8ba7bcb129d724b7141b6
Translations:Template:Documentation subpage/8/nl
1198
57
66
2023-03-15T23:02:43Z
Ancyker
1
Created page with "== Zie ook =="
wikitext
text/x-wiki
== Zie ook ==
327fc1818f14c05eada432624222abaa08a29cd0
Translations:Template:Documentation subpage/Page display title/nl
1198
58
67
2023-03-15T23:02:56Z
Ancyker
1
Created page with "Sjabloon:Documentation subpage/nl"
wikitext
text/x-wiki
Sjabloon:Documentation subpage/nl
9364a9062ad36514fd28c0e860d76a3526657b7b
Template:Documentation subpage/nl
10
59
68
2023-03-15T23:11:19Z
Ancyker
1
Created page with "Het bevat informatie over het gebruik, [[$7|categorieën]] en andere inhoud die geen deel is van de originele $1."
wikitext
text/x-wiki
<noinclude>
<languages/>
</noinclude>{{#switch:
| =
<includeonly><!--
-->{{#if:{{IsDocSubpage|override={{{override|doc}}}|false=}}
| <!--(this template has been transcluded on a /doc or /{{{override}}} page)-->
</includeonly><!--
-->{{#ifeq:{{{doc-notice|show}}} |show
| {{Mbox
| type = notice
| style = margin-bottom:1.0em;
| image = [[File:OOjs UI icon book-ltr.svg|40px|alt=|link=]]
| text =
'''Dit is een [[w:Wikipedia:Template documentation|documentatie]] [[Special:MyLanguage/Help:Subpages|subpagina]] van {{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}.'''<br /><!--
-->{{#if:{{{text2|}}}{{{text1|}}}
|Het bevat informatie over het gebruik, [[Special:MyLanguage/Help:Categories|categorieën]] en andere inhoud die geen deel is van de originele {{{text2|{{{text1}}}}}}.
|Het bevat informatie over het gebruik, [[Special:MyLanguage/Help:Categories|categorieën]] en andere inhoud die geen deel is van de originele pagina {{SUBJECTSPACE}}.
}}
}}
}}<!--
-->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!--
-->{{#if:{{{inhibit|}}} |<!--(don't categorize)-->
| <includeonly><!--
-->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}
| [[Category:{{#switch:{{SUBJECTSPACE}}
| Template | Project = Template
| Module = Module
| User = User
| #default = MediaWiki
}} documentation pages{{#translation:}}]]
| [[Category:Documentation subpages without corresponding pages{{#translation:}}]]
}}<!--
--></includeonly>
}}<!--
(completing initial #ifeq: at start of template:)
--><includeonly>
| <!--(this template has not been transcluded on a /doc or /{{{override}}} page)-->
}}<!--
--></includeonly>
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:Documentation subpage|noshift=1|uselang={{int:lang}}}}
}}<noinclude>
{{Documentation|content=
<span id="Usage"></span>
== Gebruik ==
Gebruik dit sjabloon op de documentatie subpagina (/doc).
<span id="See_also"></span>
== Zie ook ==
*{{tl|Documentation}}
*{{tl|tl}}
}}
</noinclude>
a543736e1be514a12cedf8fd8c256c4168f0cf08
Translations:Template:GPL/Page display title/en
1198
60
69
2023-03-15T23:13:35Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
Template:GPL
f47b776296cdb931f20a5bf7170c71472f9f6f36
Translations:Template:GPL/4/en
1198
61
70
2023-03-15T23:13:35Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
GNU head
ca1c245b69ae965afdf522d6a015735dbd53ccf4
Template:GPL/en
10
62
71
2023-03-15T23:13:39Z
FuzzyBot
5
Updating to match new version of source page
wikitext
text/x-wiki
<noinclude>
<languages/>
</noinclude>{{#switch:
| =
{{mbox
| class = licensetpl noviewer
| type = notice
| image = [[File:Heckert GNU white.svg|none|50px|GNU head]]
| text = ''{{image other|{{int:Wm-license-gpl-text}}|{{int|Wm-license-gpl-text}}}}''<!--
--><span style="display:none;"><span class="licensetpl_short">GPLv2+</span><span class="licensetpl_long">GNU General Public License v2+</span><span class="licensetpl_link"><nowiki>http</nowiki>://www.gnu.org/copyleft/gpl.html</span></span>
}}<includeonly>{{image other|[[Category:GPL images|{{PAGENAME}}]]}}</includeonly>
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:GPL|noshift=1|uselang={{image other|{{int:lang}}|{{PAGELANGUAGE}}}}}}
}}<noinclude>
{{documentation|Template:GPL/doc}}
</noinclude>
a63cb6a62b62482c9e00582173dd9b0a687b48d7
Module:Message box/imbox.css
828
63
72
2023-03-15T23:14:15Z
Ancyker
1
Created page with "/** * {{imbox}} (image message box) styles * * @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-enwp-boxes.css * @revision 2021-07-15 */ table.imbox { margin: 4px 10%; border-collapse: collapse; /* Default "notice" blue */ border: 3px solid #36c; background-color: #fbfbfb; box-sizing: border-box; } /* For imboxes inside imbox-text cells. */ .imbox .mbox-text .imbox { /* 0.9 - 0.5 = 0.4em left/right. */ margin: 0 -0.5em; /* Fix for webkit to f..."
sanitized-css
text/css
/**
* {{imbox}} (image message box) styles
*
* @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-enwp-boxes.css
* @revision 2021-07-15
*/
table.imbox {
margin: 4px 10%;
border-collapse: collapse;
/* Default "notice" blue */
border: 3px solid #36c;
background-color: #fbfbfb;
box-sizing: border-box;
}
/* For imboxes inside imbox-text cells. */
.imbox .mbox-text .imbox {
/* 0.9 - 0.5 = 0.4em left/right. */
margin: 0 -0.5em;
/* Fix for webkit to force 100% width. */
display: block;
}
/* For imboxes inside other templates. */
.mbox-inside .imbox {
margin: 4px;
}
/* An empty narrow cell */
.imbox td.mbox-empty-cell {
border: none;
padding: 0;
width: 1px;
}
/* The message body cell(s) */
.imbox th.mbox-text,
.imbox td.mbox-text {
border: none;
/* 0.9em left/right */
padding: 0.25em 0.9em;
/* Make all mboxes the same width regardless of text length */
width: 100%;
}
/* The left image cell */
.imbox td.mbox-image {
/* 0.9em left, 0px right */
/* @noflip */
padding: 2px 0 2px 0.9em;
}
/* The right image cell */
.imbox td.mbox-imageright {
/* 0px left, 0.9em right */
/* @noflip */
padding: 2px 0.9em 2px 0;
}
table.imbox-notice {
/* Blue */
border-color: #36c;
}
table.imbox-speedy {
/* Pink */
background-color: #fee7e6;
}
table.imbox-delete,
table.imbox-speedy {
/* Red */
border-color: #b32424;
}
table.imbox-content {
/* Orange */
border-color: #f28500;
}
table.imbox-style {
/* Yellow */
border-color: #fc3;
}
table.imbox-move {
/* Purple */
border-color: #9932cc;
}
table.imbox-protection {
/* Gray-gold */
border-color: #a2a9b1;
}
table.imbox-license {
/* Dark gray */
border-color: #88a;
/* Light gray */
background-color: #f7f8ff;
}
table.imbox-featured {
/* Brown-gold */
border-color: #cba135;
}
70d614c07887e6b3200a305be2ca1eef9ae781c5
Main Page
0
1
73
8
2023-03-15T23:18:49Z
Ancyker
1
wikitext
text/x-wiki
<div aria-hidden="true" role="presentation">[[File:Oscr-render.png|{{dir|{{PAGELANGUAGE}}|left|right}}|thumb|320px|<translate>Render of [[HW5]]</translate>]]</div>
Welcome to the community wiki for the Open Source Cartridge Reader (OSCR)! This project represents a community-driven effort to provide an easy to build and easy to modify cartridge dumper. Its main purpose is to dump a video game's ROM and save file to an SD card without the need of a PC.
7dab012bea7d061cea7010c49a1088e595f58b6d
74
73
2023-03-15T23:20:08Z
Ancyker
1
wikitext
text/x-wiki
<div aria-hidden="true" role="presentation">[[File:Oscr-render.png|{{dir|{{PAGELANGUAGE}}|left|right}}|thumb|320px|<translate>Render of [[HW5]]</translate>]]</div>
<translate>Welcome to the community wiki for the Open Source Cartridge Reader (OSCR)! This project represents a community-driven effort to provide an easy-to-build and easy-to-modify cartridge dumper. Its main purpose is to dump a video game's ROM and savefile to an SD card without the need for a PC.</translate>
f4980a40eaf217e798fad7d2194b73290740eeef
75
74
2023-03-15T23:20:31Z
Ancyker
1
Marked this version for translation
wikitext
text/x-wiki
<div aria-hidden="true" role="presentation">[[File:Oscr-render.png|{{dir|{{PAGELANGUAGE}}|left|right}}|thumb|320px|<translate><!--T:1--> Render of [[HW5]]</translate>]]</div>
<translate><!--T:2--> Welcome to the community wiki for the Open Source Cartridge Reader (OSCR)! This project represents a community-driven effort to provide an easy-to-build and easy-to-modify cartridge dumper. Its main purpose is to dump a video game's ROM and savefile to an SD card without the need for a PC.</translate>
c5394087942daf88ffc7c4a59a4788e54675a0b0
89
75
2024-05-16T00:59:42Z
Ancyker
1
wikitext
text/x-wiki
<div aria-hidden="true" role="presentation">[[File:Oscr-render.png|{{dir|{{PAGELANGUAGE}}|left|right}}|thumb|320px|<translate><!--T:1--> Render of [[HW5]]</translate>]]</div>
<translate><!--T:2--> Welcome to the community wiki for the Open Source Cartridge Reader (OSCR)! This project represents a community-driven effort to provide an easy-to-build and easy-to-modify cartridge dumper. Its main purpose is to dump a video game's ROM and savefile to an SD card without the need for a PC.</translate>
=== <translate>Quick Links</translate> ===
* <translate>[[Special:MyLanguage/OSCR|OSCR Information]] - General information on the OSCR including details on past revisions.</translate>
* <translate>[[Special:MyLanguage/OSCR:Build Guide|Build Guide]] - A guide for building your own OSCR.</translate>
* <translate>[[Special:MyLanguage/OSCR:Usage Guide|Usage Guide]] - A guide for how to use the OSCR.</translate>
* <translate>[[Special:MyLanguage/Consoles|Console Manufacturers and Information]] - A list of console manufacturers and the consoles they've made. Includes technical details on consoles such as pin configuration, etc.</translate>
abff1ea279cf043b2f8306db354b4eaca1bb79b2
91
89
2024-05-16T01:09:36Z
Ancyker
1
Marked this version for translation
wikitext
text/x-wiki
<div aria-hidden="true" role="presentation">[[File:Oscr-render.png|{{dir|{{PAGELANGUAGE}}|left|right}}|thumb|320px|<translate><!--T:1--> Render of [[HW5]]</translate>]]</div>
<translate><!--T:2--> Welcome to the community wiki for the Open Source Cartridge Reader (OSCR)! This project represents a community-driven effort to provide an easy-to-build and easy-to-modify cartridge dumper. Its main purpose is to dump a video game's ROM and savefile to an SD card without the need for a PC.</translate>
=== <translate><!--T:3--> Quick Links</translate> ===
* <translate><!--T:4--> [[Special:MyLanguage/OSCR|OSCR Information]] - General information on the OSCR including details on past revisions.</translate>
* <translate><!--T:5--> [[Special:MyLanguage/OSCR:Build Guide|Build Guide]] - A guide for building your own OSCR.</translate>
* <translate><!--T:6--> [[Special:MyLanguage/OSCR:Usage Guide|Usage Guide]] - A guide for how to use the OSCR.</translate>
* <translate><!--T:7--> [[Special:MyLanguage/Consoles|Console Manufacturers and Information]] - A list of console manufacturers and the consoles they've made. Includes technical details on consoles such as pin configuration, etc.</translate>
a42c4e1546bb25273f2de2832f27577ec3be1855
106
91
2024-05-16T02:01:53Z
Ancyker
1
wikitext
text/x-wiki
<languages/>
<div aria-hidden="true" role="presentation">[[File:Oscr-render.png|{{dir|{{PAGELANGUAGE}}|left|right}}|thumb|320px|<translate><!--T:1--> Render of [[HW5]]</translate>]]</div>
<translate><!--T:2--> Welcome to the community wiki for the Open Source Cartridge Reader (OSCR)! This project represents a community-driven effort to provide an easy-to-build and easy-to-modify cartridge dumper. Its main purpose is to dump a video game's ROM and savefile to an SD card without the need for a PC.</translate>
=== <translate><!--T:3--> Quick Links</translate> ===
* <translate><!--T:4--> [[Special:MyLanguage/OSCR|OSCR Information]] - General information on the OSCR including details on past revisions.</translate>
* <translate><!--T:5--> [[Special:MyLanguage/OSCR:Build Guide|Build Guide]] - A guide for building your own OSCR.</translate>
* <translate><!--T:6--> [[Special:MyLanguage/OSCR:Usage Guide|Usage Guide]] - A guide for how to use the OSCR.</translate>
* <translate><!--T:7--> [[Special:MyLanguage/Consoles|Console Manufacturers and Information]] - A list of console manufacturers and the consoles they've made. Includes technical details on consoles such as pin configuration, etc.</translate>
ca1f0370910d8bffd43ebed2e14476b467de9aee
Translations:Main Page/Page display title/en
1198
64
76
2023-03-15T23:20:34Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
Main Page
29b077bd4b72e57c6500fdd2d77e1a8b60f2816b
Translations:Main Page/1/en
1198
65
77
2023-03-15T23:20:34Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
Render of [[HW5]]
eef50cf83f16423621fbe02e1c4f4810f34bb3d3
Translations:Main Page/2/en
1198
66
78
2023-03-15T23:20:34Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
Welcome to the community wiki for the Open Source Cartridge Reader (OSCR)! This project represents a community-driven effort to provide an easy-to-build and easy-to-modify cartridge dumper. Its main purpose is to dump a video game's ROM and savefile to an SD card without the need for a PC.
80fc94dec6252fda6a1ccc7f6f19d7805b58c117
Main Page/en
0
67
79
2023-03-15T23:20:36Z
FuzzyBot
5
Updating to match new version of source page
wikitext
text/x-wiki
<div aria-hidden="true" role="presentation">[[File:Oscr-render.png|{{dir|{{PAGELANGUAGE}}|left|right}}|thumb|320px|Render of [[HW5]]]]</div>
Welcome to the community wiki for the Open Source Cartridge Reader (OSCR)! This project represents a community-driven effort to provide an easy-to-build and easy-to-modify cartridge dumper. Its main purpose is to dump a video game's ROM and savefile to an SD card without the need for a PC.
16004af2cdd2202683a0184595c78348ab84e643
97
79
2024-05-16T01:09:46Z
FuzzyBot
5
Updating to match new version of source page
wikitext
text/x-wiki
<div aria-hidden="true" role="presentation">[[File:Oscr-render.png|{{dir|{{PAGELANGUAGE}}|left|right}}|thumb|320px|Render of [[HW5]]]]</div>
Welcome to the community wiki for the Open Source Cartridge Reader (OSCR)! This project represents a community-driven effort to provide an easy-to-build and easy-to-modify cartridge dumper. Its main purpose is to dump a video game's ROM and savefile to an SD card without the need for a PC.
=== Quick Links ===
* [[Special:MyLanguage/OSCR|OSCR Information]] - General information on the OSCR including details on past revisions.
* [[Special:MyLanguage/OSCR:Build Guide|Build Guide]] - A guide for building your own OSCR.
* [[Special:MyLanguage/OSCR:Usage Guide|Usage Guide]] - A guide for how to use the OSCR.
* [[Special:MyLanguage/Consoles|Console Manufacturers and Information]] - A list of console manufacturers and the consoles they've made. Includes technical details on consoles such as pin configuration, etc.
5dae190df6effe7d01702f7f6b538981d6828a22
Template:Dir
10
68
80
2023-03-15T23:23:09Z
Ancyker
1
Created page with "{{#switch:{{lc:{{#if:{{{lang|}}}|{{{lang|}}}|{{#if:{{{1|}}}|{{{1|}}}|{{int:lang}}}}}}}} |aeb|aeb-arab|aic|ar|arc|arq|ary|arz|azb|bcc|bgn|bqi|bqp|ckb|ckb-arab|dv|en-rtl|fa|fa-af|glk|ha-arab|haz|he|khw|kk-arab|kk-cn|ks|ks-arab|ku-arab|lki|lrc|luz|mzn|nqo|ota|phn|pnb|prd|prs|ps|sd|sdh|skr|skr-arab|tg-arab|tly|ug|ug-arab|ur|uz-arab|xpu|ydd|yi ={{#ifeq:{{{rtl|}}}|{{{rtl|-}}}|{{{rtl|}}}|{{#ifeq:{{{2|}}}|{{{2|-}}}|{{{2|}}}|rtl}}}} |#default ={{#ifeq:{{{ltr|}}}|{{{ltr|-}}}|{{{lt..."
wikitext
text/x-wiki
{{#switch:{{lc:{{#if:{{{lang|}}}|{{{lang|}}}|{{#if:{{{1|}}}|{{{1|}}}|{{int:lang}}}}}}}}
|aeb|aeb-arab|aic|ar|arc|arq|ary|arz|azb|bcc|bgn|bqi|bqp|ckb|ckb-arab|dv|en-rtl|fa|fa-af|glk|ha-arab|haz|he|khw|kk-arab|kk-cn|ks|ks-arab|ku-arab|lki|lrc|luz|mzn|nqo|ota|phn|pnb|prd|prs|ps|sd|sdh|skr|skr-arab|tg-arab|tly|ug|ug-arab|ur|uz-arab|xpu|ydd|yi
={{#ifeq:{{{rtl|}}}|{{{rtl|-}}}|{{{rtl|}}}|{{#ifeq:{{{2|}}}|{{{2|-}}}|{{{2|}}}|rtl}}}}
|#default
={{#ifeq:{{{ltr|}}}|{{{ltr|-}}}|{{{ltr|}}}|{{#ifeq:{{{3|}}}|{{{3|-}}}|{{{3|}}}|ltr}}}}
}}<noinclude>{{documentation}}</noinclude>
2ea56bd56901a92d8a5cb44b0835e8534d5e0807
Consoles:Nintendo
0
70
85
2024-05-16T00:31:50Z
Ancyker
1
Created page with "This is a list of Nintendo's mainline consoles. Only mainline consoles should be listed on this page. A mainline console is one that is the first console to play a system-specific game and isn't just a design refresh. For example, the Game Boy Pocket could only play Game Boy games, so it should be listed in a subsection within the Game Boy page. In contrast, the Game Boy Color could play those games as well as its own games which could not be played on the Game Boy. ==..."
wikitext
text/x-wiki
This is a list of Nintendo's mainline consoles. Only mainline consoles should be listed on this page. A mainline console is one that is the first console to play a system-specific game and isn't just a design refresh. For example, the Game Boy Pocket could only play Game Boy games, so it should be listed in a subsection within the Game Boy page. In contrast, the Game Boy Color could play those games as well as its own games which could not be played on the Game Boy.
== Home Consoles ==
{| class="wikitable"
|+
!Name
!Released
!Launch MSRP
|-
|[[Consoles:Nintendo/Color TV-Game|Color TV-Game]]
|JPN: June 1, 1977
|¥15,000
|-
|[[Consoles:Nintendo/Family Computer|Family Computer (Famicom/FC)Nintendo Entertainment System (NES)]]
|JPN: July 15, 1983
NA: October 18, 1985
EU: September 1, 1986
|¥14,800
$179.99
|-
|[[Consoles:Nintendo/Super Famicom|Super Famicom (SFC)Super Nintendo Entertainment System (SNES)]]
|JPN: November 21, 1990
NA: August 23, 1991
EU: June 1992
|¥25,000
$199.99
|-
|[[Consoles:Nintendo/Nintendo 64|Nintendo 64 (N64)]]
|JPN: June 23, 1996
NA: September 29, 1996
EU: March 1, 1997
|¥25,000
$199.99
|-
|[[Consoles:Nintendo/GameCube|GameCube (NGC or GC)]]
|JPN: September 14, 2001
NA: November 18, 2001
EU: May 3, 2002
|¥25,000
$199.99
|-
|[[Consoles:Nintendo/Wii|Wii]]
|JPN: December 2, 2006
NA: November 19, 2006
|¥25,000
$249.99
|-
|[[Consoles:Nintendo/Wii U|Wii U]]
|JPN: December 8, 2012
NA: November 18, 2012
EU: November 30, 2012
|¥26,250
$299.99
|}
== Handheld Consoles ==
{| class="wikitable"
|+
!Name
!Released
!Launch MSRP
|-
|Game & Watch
|
|
|-
|[[Consoles:Nintendo/Game Boy|Game Boy]]
|JPN: April 21, 1989
NA: July 31, 1989
EU: September 28, 1990
|¥12,500
$89.99
|-
|[[Consoles:Nintendo/Game Boy Color|Game Boy Color]]
|JPN: October 21, 1998
NA: November 18, 1998
EU: November 23, 1998
|¥8,900
$79.95
|-
|[[Consoles:Nintendo/Game Boy Advance|Game Boy Advance]]
|JPN: March 21, 2001
NA: June 11, 2001
EU: June 22, 2001
|¥9,800
$99.99
|-
|[[Consoles:Nintendo/Nintendo DS|Nintendo DS]]
|JPN: December 2, 2004
NA: November 21, 2004
EU: March 11, 2005
|¥15,000
$149.99
|-
|[[Consoles:Nintendo/Nintendo 3DS|Nintendo 3DS]]
|JPN: February 26, 2011
NA: March 27, 2011
EU: March 25, 2011
|¥25,000
$249.99
|-
|[[Consoles:Nintendo/Nintendo Switch|Nintendo Switch]]
|World: March 3, 2017
|¥29,980
$299.99
|}
6f20c013990f7a89208c1604b7f18b8ce2df1287
86
85
2024-05-16T00:32:56Z
Ancyker
1
wikitext
text/x-wiki
This is a list of Nintendo's mainline consoles. Only mainline consoles should be listed on this page. A mainline console is one that is the first console to play a system-specific game and isn't just a design refresh. For example, the Game Boy Pocket could only play Game Boy games, so it should be listed in a subsection within the Game Boy page. In contrast, the Game Boy Color could play those games as well as its own games which could not be played on the Game Boy.
== Home Consoles ==
{| class="wikitable"
|+
!Name
!Released
!Launch MSRP
|-
|[[Consoles:Nintendo/Color TV-Game|Color TV-Game]]
|JPN: June 1, 1977
|¥15,000
|-
|[[Consoles:Nintendo/Family Computer|Family Computer (Famicom/FC)]][[Consoles:Nintendo/Family Computer|Nintendo Entertainment System (NES)]]
|JPN: July 15, 1983
NA: October 18, 1985
EU: September 1, 1986
|¥14,800
$179.99
|-
|[[Consoles:Nintendo/Super Famicom|Super Famicom (SFC)]][[Consoles:Nintendo/Super Famicom|Super Nintendo Entertainment System (SNES)]]
|JPN: November 21, 1990
NA: August 23, 1991
EU: June 1992
|¥25,000
$199.99
|-
|[[Consoles:Nintendo/Nintendo 64|Nintendo 64 (N64)]]
|JPN: June 23, 1996
NA: September 29, 1996
EU: March 1, 1997
|¥25,000
$199.99
|-
|[[Consoles:Nintendo/GameCube|GameCube (NGC or GC)]]
|JPN: September 14, 2001
NA: November 18, 2001
EU: May 3, 2002
|¥25,000
$199.99
|-
|[[Consoles:Nintendo/Wii|Wii]]
|JPN: December 2, 2006
NA: November 19, 2006
|¥25,000
$249.99
|-
|[[Consoles:Nintendo/Wii U|Wii U]]
|JPN: December 8, 2012
NA: November 18, 2012
EU: November 30, 2012
|¥26,250
$299.99
|}
== Handheld Consoles ==
{| class="wikitable"
|+
!Name
!Released
!Launch MSRP
|-
|Game & Watch
|
|
|-
|[[Consoles:Nintendo/Game Boy|Game Boy]]
|JPN: April 21, 1989
NA: July 31, 1989
EU: September 28, 1990
|¥12,500
$89.99
|-
|[[Consoles:Nintendo/Game Boy Color|Game Boy Color]]
|JPN: October 21, 1998
NA: November 18, 1998
EU: November 23, 1998
|¥8,900
$79.95
|-
|[[Consoles:Nintendo/Game Boy Advance|Game Boy Advance]]
|JPN: March 21, 2001
NA: June 11, 2001
EU: June 22, 2001
|¥9,800
$99.99
|-
|[[Consoles:Nintendo/Nintendo DS|Nintendo DS]]
|JPN: December 2, 2004
NA: November 21, 2004
EU: March 11, 2005
|¥15,000
$149.99
|-
|[[Consoles:Nintendo/Nintendo 3DS|Nintendo 3DS]]
|JPN: February 26, 2011
NA: March 27, 2011
EU: March 25, 2011
|¥25,000
$249.99
|-
|[[Consoles:Nintendo/Nintendo Switch|Nintendo Switch]]
|World: March 3, 2017
|¥29,980
$299.99
|}
ce757ab6bfc89132e8c517014ce7b0bf9e417a3b
87
86
2024-05-16T00:33:43Z
Ancyker
1
/* Home Consoles */
wikitext
text/x-wiki
This is a list of Nintendo's mainline consoles. Only mainline consoles should be listed on this page. A mainline console is one that is the first console to play a system-specific game and isn't just a design refresh. For example, the Game Boy Pocket could only play Game Boy games, so it should be listed in a subsection within the Game Boy page. In contrast, the Game Boy Color could play those games as well as its own games which could not be played on the Game Boy.
== Home Consoles ==
{| class="wikitable"
|+
!Name
!Released
!Launch MSRP
|-
|[[Consoles:Nintendo/Color TV-Game|Color TV-Game]]
|JPN: June 1, 1977
|¥15,000
|-
|[[Consoles:Nintendo/Family Computer|Family Computer (Famicom/FC)]]
[[Consoles:Nintendo/Family Computer|Nintendo Entertainment System (NES)]]
|JPN: July 15, 1983
NA: October 18, 1985
EU: September 1, 1986
|¥14,800
$179.99
|-
|[[Consoles:Nintendo/Super Famicom|Super Famicom (SFC)]]
[[Consoles:Nintendo/Super Famicom|Super Nintendo Entertainment System (SNES)]]
|JPN: November 21, 1990
NA: August 23, 1991
EU: June 1992
|¥25,000
$199.99
|-
|[[Consoles:Nintendo/Nintendo 64|Nintendo 64 (N64)]]
|JPN: June 23, 1996
NA: September 29, 1996
EU: March 1, 1997
|¥25,000
$199.99
|-
|[[Consoles:Nintendo/GameCube|GameCube (NGC or GC)]]
|JPN: September 14, 2001
NA: November 18, 2001
EU: May 3, 2002
|¥25,000
$199.99
|-
|[[Consoles:Nintendo/Wii|Wii]]
|JPN: December 2, 2006
NA: November 19, 2006
|¥25,000
$249.99
|-
|[[Consoles:Nintendo/Wii U|Wii U]]
|JPN: December 8, 2012
NA: November 18, 2012
EU: November 30, 2012
|¥26,250
$299.99
|}
== Handheld Consoles ==
{| class="wikitable"
|+
!Name
!Released
!Launch MSRP
|-
|Game & Watch
|
|
|-
|[[Consoles:Nintendo/Game Boy|Game Boy]]
|JPN: April 21, 1989
NA: July 31, 1989
EU: September 28, 1990
|¥12,500
$89.99
|-
|[[Consoles:Nintendo/Game Boy Color|Game Boy Color]]
|JPN: October 21, 1998
NA: November 18, 1998
EU: November 23, 1998
|¥8,900
$79.95
|-
|[[Consoles:Nintendo/Game Boy Advance|Game Boy Advance]]
|JPN: March 21, 2001
NA: June 11, 2001
EU: June 22, 2001
|¥9,800
$99.99
|-
|[[Consoles:Nintendo/Nintendo DS|Nintendo DS]]
|JPN: December 2, 2004
NA: November 21, 2004
EU: March 11, 2005
|¥15,000
$149.99
|-
|[[Consoles:Nintendo/Nintendo 3DS|Nintendo 3DS]]
|JPN: February 26, 2011
NA: March 27, 2011
EU: March 25, 2011
|¥25,000
$249.99
|-
|[[Consoles:Nintendo/Nintendo Switch|Nintendo Switch]]
|World: March 3, 2017
|¥29,980
$299.99
|}
8faf2a053c7679f2317bf837dc6e3df34177ba00
98
87
2024-05-16T01:53:49Z
Ancyker
1
wikitext
text/x-wiki
<languages/>
<translate>
This is a list of Nintendo's mainline consoles. Only mainline consoles should be listed on this page. A mainline console is one that is the first console to play a system-specific game and isn't just a design refresh. For example, the Game Boy Pocket could only play Game Boy games, so it should be listed in a subsection within the Game Boy page. In contrast, the Game Boy Color could play those games as well as its own games which could not be played on the Game Boy.
</translate>
== <translate>Home Consoles</translate> ==
{| class="wikitable"
|+
!<translate><tvar name="name">Name</tvar></translate>
!<translate><tvar name="released">Released</tvar></translate>
!<translate><tvar name="launchmsrp">Launch MSRP</tvar></translate>
|-
|[[Special:MyLanguage/Consoles:Nintendo/Color TV-Game|Color TV-Game]]
|<translate><tvar name="jpn">JPN:</tvar></translate> {{#dateformat:1977-05-01|mdy}}
|¥{{FORMATNUM:15000}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Family Computer|Family Computer (Famicom/FC)]]<br>[[Special:MyLanguage/Consoles:Nintendo/Family Computer|Nintendo Entertainment System (NES)]]
|<translate><tvar name="jpn">JPN:</tvar></translate> {{#dateformat:1983-07-15|mdy}}<br><translate><tvar name="na">NA:</tvar></translate> {{#dateformat:1985-10-18|mdy}}<br><translate><tvar name="eu">EU:</tvar></translate> {{#dateformat:1986-09-01|mdy}}
|¥{{FORMATNUM:14800}}<br>${{FORMATNUM:179.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Super Famicom|Super Famicom (SFC)]]<br>[[Special:MyLanguage/Consoles:Nintendo/Super Famicom|Super Nintendo Entertainment System (SNES)]]
|<translate><tvar name="jpn">JPN:</tvar></translate> {{#dateformat:1990-11-21|mdy}}<br><translate><tvar name="na">NA:</tvar></translate> {{#dateformat:1991-08-23|mdy}}<br><translate><tvar name="eu">EU:</tvar></translate> {{#dateformat:1992-04-11|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:199.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo 64|Nintendo 64 (N64)]]
|<translate><tvar name="jpn">JPN:</tvar></translate> {{#dateformat:1996-06-23|mdy}}<br><translate><tvar name="na">NA:</tvar></translate> {{#dateformat:1996-09-29|mdy}}<br><translate><tvar name="eu">EU:</tvar></translate> {{#dateformat:1997-03-23|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:199.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/GameCube|GameCube (NGC or GC)]]
|<translate><tvar name="jpn">JPN:</tvar></translate> {{#dateformat:2001-09-14|mdy}}<br><translate><tvar name="na">NA:</tvar></translate> {{#dateformat:2001-11-18|mdy}}<br><translate><tvar name="eu">EU:</tvar></translate> {{#dateformat:2002-05-03|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:199.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Wii|Wii]]
|<translate><tvar name="jpn">JPN:</tvar></translate> {{#dateformat:2006-12-02|mdy}}<br><translate><tvar name="na">NA:</tvar></translate> {{#dateformat:2006-11-19|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:249.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Wii U|Wii U]]
|<translate><tvar name="jpn">JPN:</tvar></translate> {{#dateformat:2012-12-08|mdy}}<br><translate><tvar name="na">NA:</tvar></translate> {{#dateformat:2012-11-18|mdy}}<br><translate><tvar name="eu">EU:</tvar></translate> {{#dateformat:2012-11-30|mdy}}
|¥{{FORMATNUM:26250}}<br>${{FORMATNUM:299.99}}
|}
== <translate>Handheld Consoles</translate> ==
{| class="wikitable"
|+
!<translate><tvar name="name">Name</tvar></translate>
!<translate><tvar name="released">Released</tvar></translate>
!<translate><tvar name="launchmsrp">Launch MSRP</tvar></translate>
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game & Watch|Game & Watch]]
|<translate><tvar name="jpn">JPN:</tvar></translate> {{#dateformat:1980-04-28|mdy}}
|¥{{FORMATNUM:5800}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game Boy|Game Boy]]
|<translate><tvar name="jpn">JPN:</tvar></translate> {{#dateformat:1989-04-21|mdy}}<br><translate><tvar name="na">NA:</tvar></translate> {{#dateformat:1989-07-31|mdy}}<br><translate><tvar name="eu">EU:</tvar></translate> {{#dateformat:1990-09-28|mdy}}
|¥{{FORMATNUM:12500}}<br>${{FORMATNUM:89.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game Boy Color|Game Boy Color]]
|<translate><tvar name="jpn">JPN:</tvar></translate> {{#dateformat:1998-10-21|mdy}}<br><translate><tvar name="na">NA:</tvar></translate> {{#dateformat:1998-11-18|mdy}}<br><translate><tvar name="eu">EU:</tvar></translate> {{#dateformat:1998-11-23|mdy}}
|¥{{FORMATNUM:8900}}<br>${{FORMATNUM:79.95}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game Boy Advance|Game Boy Advance]]
|<translate><tvar name="jpn">JPN:</tvar></translate> {{#dateformat:2001-03-21|mdy}}<br><translate><tvar name="na">NA:</tvar></translate> {{#dateformat:2001-06-11|mdy}}<br><translate><tvar name="eu">EU:</tvar></translate> {{#dateformat:2001-06-22|mdy}}
|¥{{FORMATNUM:9800}}<br>${{FORMATNUM:99.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo DS|Nintendo DS]]
|<translate><tvar name="jpn">JPN:</tvar></translate> {{#dateformat:2004-12-02|mdy}}<br><translate><tvar name="na">NA:</tvar></translate> {{#dateformat:2004-11-21|mdy}}<br><translate><tvar name="eu">EU:</tvar></translate> {{#dateformat:2005-03-11|mdy}}
|¥{{FORMATNUM:15000}}<br>${{FORMATNUM:149.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo 3DS|Nintendo 3DS]]
|<translate><tvar name="jpn">JPN:</tvar></translate> {{#dateformat:2011-02-26|mdy}}<br><translate><tvar name="na">NA:</tvar></translate> {{#dateformat:2011-03-27|mdy}}<br><translate><tvar name="eu">EU:</tvar></translate> {{#dateformat:2011-03-25|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:249.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo Switch|Nintendo Switch]]
|<translate><tvar name="world">World:</tvar></translate> {{#dateformat:2017-03-03|mdy}}
|¥{{FORMATNUM:29980}}<br>${{FORMATNUM:299.99}}
|}
b254af851ea5557b2848824ca4d804005b3e5728
99
98
2024-05-16T01:59:48Z
Ancyker
1
wikitext
text/x-wiki
<languages/>
<translate>
This is a list of Nintendo's mainline consoles. Only mainline consoles should be listed on this page. A mainline console is one that is the first console to play a system-specific game and isn't just a design refresh. For example, the Game Boy Pocket could only play Game Boy games, so it should be listed in a subsection within the Game Boy page. In contrast, the Game Boy Color could play those games as well as its own games which could not be played on the Game Boy.
</translate>
== <translate>Home Consoles</translate> ==
{| class="wikitable"
|+
!Name
!Released
!Launch MSRP
|-
|[[Special:MyLanguage/Consoles:Nintendo/Color TV-Game|Color TV-Game]]
|JPN: {{#dateformat:1977-05-01|mdy}}
|¥{{FORMATNUM:15000}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Family Computer|Family Computer (Famicom/FC)]]<br>[[Special:MyLanguage/Consoles:Nintendo/Family Computer|Nintendo Entertainment System (NES)]]
|JPN: {{#dateformat:1983-07-15|mdy}}<br>NA: {{#dateformat:1985-10-18|mdy}}<br>EU: {{#dateformat:1986-09-01|mdy}}
|¥{{FORMATNUM:14800}}<br>${{FORMATNUM:179.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Super Famicom|Super Famicom (SFC)]]<br>[[Special:MyLanguage/Consoles:Nintendo/Super Famicom|Super Nintendo Entertainment System (SNES)]]
|JPN: {{#dateformat:1990-11-21|mdy}}<br>NA: {{#dateformat:1991-08-23|mdy}}<br>EU: {{#dateformat:1992-04-11|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:199.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo 64|Nintendo 64 (N64)]]
|JPN: {{#dateformat:1996-06-23|mdy}}<br>NA: {{#dateformat:1996-09-29|mdy}}<br>EU: {{#dateformat:1997-03-23|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:199.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/GameCube|GameCube (NGC or GC)]]
|JPN: {{#dateformat:2001-09-14|mdy}}<br>NA: {{#dateformat:2001-11-18|mdy}}<br>EU: {{#dateformat:2002-05-03|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:199.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Wii|Wii]]
|JPN: {{#dateformat:2006-12-02|mdy}}<br>NA: {{#dateformat:2006-11-19|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:249.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Wii U|Wii U]]
|JPN: {{#dateformat:2012-12-08|mdy}}<br>NA: {{#dateformat:2012-11-18|mdy}}<br>EU: {{#dateformat:2012-11-30|mdy}}
|¥{{FORMATNUM:26250}}<br>${{FORMATNUM:299.99}}
|}
== <translate>Handheld Consoles</translate> ==
{| class="wikitable"
|+
!Name
!Released
!Launch MSRP
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game & Watch|Game & Watch]]
|JPN: {{#dateformat:1980-04-28|mdy}}
|¥{{FORMATNUM:5800}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game Boy|Game Boy]]
|JPN: {{#dateformat:1989-04-21|mdy}}<br>NA: {{#dateformat:1989-07-31|mdy}}<br>EU: {{#dateformat:1990-09-28|mdy}}
|¥{{FORMATNUM:12500}}<br>${{FORMATNUM:89.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game Boy Color|Game Boy Color]]
|JPN: {{#dateformat:1998-10-21|mdy}}<br>NA: {{#dateformat:1998-11-18|mdy}}<br>EU: {{#dateformat:1998-11-23|mdy}}
|¥{{FORMATNUM:8900}}<br>${{FORMATNUM:79.95}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game Boy Advance|Game Boy Advance]]
|JPN: {{#dateformat:2001-03-21|mdy}}<br>NA: {{#dateformat:2001-06-11|mdy}}<br>EU: {{#dateformat:2001-06-22|mdy}}
|¥{{FORMATNUM:9800}}<br>${{FORMATNUM:99.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo DS|Nintendo DS]]
|JPN: {{#dateformat:2004-12-02|mdy}}<br>NA: {{#dateformat:2004-11-21|mdy}}<br>EU: {{#dateformat:2005-03-11|mdy}}
|¥{{FORMATNUM:15000}}<br>${{FORMATNUM:149.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo 3DS|Nintendo 3DS]]
|JPN: {{#dateformat:2011-02-26|mdy}}<br>NA: {{#dateformat:2011-03-27|mdy}}<br>EU: {{#dateformat:2011-03-25|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:249.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo Switch|Nintendo Switch]]
|World: {{#dateformat:2017-03-03|mdy}}
|¥{{FORMATNUM:29980}}<br>${{FORMATNUM:299.99}}
|}
1ddfeb98b8cbdd296bb59c99e07c73dea7ae7233
100
99
2024-05-16T02:00:14Z
Ancyker
1
Marked this version for translation
wikitext
text/x-wiki
<languages/>
<translate>
<!--T:1-->
This is a list of Nintendo's mainline consoles. Only mainline consoles should be listed on this page. A mainline console is one that is the first console to play a system-specific game and isn't just a design refresh. For example, the Game Boy Pocket could only play Game Boy games, so it should be listed in a subsection within the Game Boy page. In contrast, the Game Boy Color could play those games as well as its own games which could not be played on the Game Boy.
</translate>
== <translate><!--T:2--> Home Consoles</translate> ==
{| class="wikitable"
|+
!Name
!Released
!Launch MSRP
|-
|[[Special:MyLanguage/Consoles:Nintendo/Color TV-Game|Color TV-Game]]
|JPN: {{#dateformat:1977-05-01|mdy}}
|¥{{FORMATNUM:15000}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Family Computer|Family Computer (Famicom/FC)]]<br>[[Special:MyLanguage/Consoles:Nintendo/Family Computer|Nintendo Entertainment System (NES)]]
|JPN: {{#dateformat:1983-07-15|mdy}}<br>NA: {{#dateformat:1985-10-18|mdy}}<br>EU: {{#dateformat:1986-09-01|mdy}}
|¥{{FORMATNUM:14800}}<br>${{FORMATNUM:179.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Super Famicom|Super Famicom (SFC)]]<br>[[Special:MyLanguage/Consoles:Nintendo/Super Famicom|Super Nintendo Entertainment System (SNES)]]
|JPN: {{#dateformat:1990-11-21|mdy}}<br>NA: {{#dateformat:1991-08-23|mdy}}<br>EU: {{#dateformat:1992-04-11|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:199.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo 64|Nintendo 64 (N64)]]
|JPN: {{#dateformat:1996-06-23|mdy}}<br>NA: {{#dateformat:1996-09-29|mdy}}<br>EU: {{#dateformat:1997-03-23|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:199.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/GameCube|GameCube (NGC or GC)]]
|JPN: {{#dateformat:2001-09-14|mdy}}<br>NA: {{#dateformat:2001-11-18|mdy}}<br>EU: {{#dateformat:2002-05-03|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:199.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Wii|Wii]]
|JPN: {{#dateformat:2006-12-02|mdy}}<br>NA: {{#dateformat:2006-11-19|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:249.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Wii U|Wii U]]
|JPN: {{#dateformat:2012-12-08|mdy}}<br>NA: {{#dateformat:2012-11-18|mdy}}<br>EU: {{#dateformat:2012-11-30|mdy}}
|¥{{FORMATNUM:26250}}<br>${{FORMATNUM:299.99}}
|}
== <translate><!--T:3--> Handheld Consoles</translate> ==
{| class="wikitable"
|+
!Name
!Released
!Launch MSRP
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game & Watch|Game & Watch]]
|JPN: {{#dateformat:1980-04-28|mdy}}
|¥{{FORMATNUM:5800}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game Boy|Game Boy]]
|JPN: {{#dateformat:1989-04-21|mdy}}<br>NA: {{#dateformat:1989-07-31|mdy}}<br>EU: {{#dateformat:1990-09-28|mdy}}
|¥{{FORMATNUM:12500}}<br>${{FORMATNUM:89.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game Boy Color|Game Boy Color]]
|JPN: {{#dateformat:1998-10-21|mdy}}<br>NA: {{#dateformat:1998-11-18|mdy}}<br>EU: {{#dateformat:1998-11-23|mdy}}
|¥{{FORMATNUM:8900}}<br>${{FORMATNUM:79.95}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game Boy Advance|Game Boy Advance]]
|JPN: {{#dateformat:2001-03-21|mdy}}<br>NA: {{#dateformat:2001-06-11|mdy}}<br>EU: {{#dateformat:2001-06-22|mdy}}
|¥{{FORMATNUM:9800}}<br>${{FORMATNUM:99.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo DS|Nintendo DS]]
|JPN: {{#dateformat:2004-12-02|mdy}}<br>NA: {{#dateformat:2004-11-21|mdy}}<br>EU: {{#dateformat:2005-03-11|mdy}}
|¥{{FORMATNUM:15000}}<br>${{FORMATNUM:149.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo 3DS|Nintendo 3DS]]
|JPN: {{#dateformat:2011-02-26|mdy}}<br>NA: {{#dateformat:2011-03-27|mdy}}<br>EU: {{#dateformat:2011-03-25|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:249.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo Switch|Nintendo Switch]]
|World: {{#dateformat:2017-03-03|mdy}}
|¥{{FORMATNUM:29980}}<br>${{FORMATNUM:299.99}}
|}
0bcc1a4751e5e064841476cc91008f731b2463cf
Consoles
0
71
88
2024-05-16T00:38:35Z
Ancyker
1
Created page with "List of console brands. * [[Consoles:Atari|Atari]] * [[Consoles:Bandai|Bandai]] * [[Consoles:Coleco|Coleco]] * [[Consoles:Nintendo|Nintendo]] * [[Consoles:Mattel|Mattel]] * [[Consoles:Microsoft|Microsoft]] * [[Consoles:Sega|Sega]] * [[Consoles:SNK|SNK]] * [[Consoles:Sony|Sony]]"
wikitext
text/x-wiki
List of console brands.
* [[Consoles:Atari|Atari]]
* [[Consoles:Bandai|Bandai]]
* [[Consoles:Coleco|Coleco]]
* [[Consoles:Nintendo|Nintendo]]
* [[Consoles:Mattel|Mattel]]
* [[Consoles:Microsoft|Microsoft]]
* [[Consoles:Sega|Sega]]
* [[Consoles:SNK|SNK]]
* [[Consoles:Sony|Sony]]
8ea049b0d72fafa452b11c1ee1714b62873e4d91
90
88
2024-05-16T01:06:13Z
Ancyker
1
wikitext
text/x-wiki
List of console brands.
* [[Special:MyLanguage/Consoles:Atari|Atari]]
* [[Special:MyLanguage/Consoles:Bandai|Bandai]]
* [[Special:MyLanguage/Consoles:Coleco|Coleco]]
* [[Special:MyLanguage/Consoles:Nintendo|Nintendo]]
* [[Special:MyLanguage/Consoles:Mattel|Mattel]]
* [[Special:MyLanguage/Consoles:Microsoft|Microsoft]]
* [[Special:MyLanguage/Consoles:Sega|Sega]]
* [[Special:MyLanguage/Consoles:SNK|SNK]]
* [[Special:MyLanguage/Consoles:Sony|Sony]]
082f07cf368ecda82e0a212c2fbda3354a405c1c
Translations:Main Page/3/en
1198
72
92
2024-05-16T01:09:36Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
Quick Links
917bcf00a5f43df11b199071267499daef7275d9
Translations:Main Page/4/en
1198
73
93
2024-05-16T01:09:36Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
[[Special:MyLanguage/OSCR|OSCR Information]] - General information on the OSCR including details on past revisions.
dc03bad349fcefae1f9016c9756c1e2fa80e9d8d
Translations:Main Page/5/en
1198
74
94
2024-05-16T01:09:36Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
[[Special:MyLanguage/OSCR:Build Guide|Build Guide]] - A guide for building your own OSCR.
29aa830b87741904fd92f57689d81f252cca0fb7
Translations:Main Page/6/en
1198
75
95
2024-05-16T01:09:36Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
[[Special:MyLanguage/OSCR:Usage Guide|Usage Guide]] - A guide for how to use the OSCR.
823f83407bbaba19e8a8b54ab44deea6c845bed4
Translations:Main Page/7/en
1198
76
96
2024-05-16T01:09:37Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
[[Special:MyLanguage/Consoles|Console Manufacturers and Information]] - A list of console manufacturers and the consoles they've made. Includes technical details on consoles such as pin configuration, etc.
817d8b68af2f047b7bbaa3ee90964cb85c67b976
Translations:Consoles:Nintendo/Page display title/en
1198
77
101
2024-05-16T02:00:20Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
Consoles:Nintendo
4eb1ca2b88e75c995e769c3fc9e9e1365f7daeb9
Translations:Consoles:Nintendo/1/en
1198
78
102
2024-05-16T02:00:20Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
This is a list of Nintendo's mainline consoles. Only mainline consoles should be listed on this page. A mainline console is one that is the first console to play a system-specific game and isn't just a design refresh. For example, the Game Boy Pocket could only play Game Boy games, so it should be listed in a subsection within the Game Boy page. In contrast, the Game Boy Color could play those games as well as its own games which could not be played on the Game Boy.
97bf4fd74e46c325fc39ba638807af4cc5ce9b63
Translations:Consoles:Nintendo/2/en
1198
79
103
2024-05-16T02:00:20Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
Home Consoles
9c621906b72d5b48c0e2393a51b28243f764866c
Translations:Consoles:Nintendo/3/en
1198
80
104
2024-05-16T02:00:20Z
FuzzyBot
5
Importing a new version from external source
wikitext
text/x-wiki
Handheld Consoles
833c9a95cfcc36ce6aa89252ba5fe9a0dcc71d2c
Consoles:Nintendo/en
0
81
105
2024-05-16T02:00:26Z
FuzzyBot
5
Updating to match new version of source page
wikitext
text/x-wiki
<languages/>
This is a list of Nintendo's mainline consoles. Only mainline consoles should be listed on this page. A mainline console is one that is the first console to play a system-specific game and isn't just a design refresh. For example, the Game Boy Pocket could only play Game Boy games, so it should be listed in a subsection within the Game Boy page. In contrast, the Game Boy Color could play those games as well as its own games which could not be played on the Game Boy.
== Home Consoles ==
{| class="wikitable"
|+
!Name
!Released
!Launch MSRP
|-
|[[Special:MyLanguage/Consoles:Nintendo/Color TV-Game|Color TV-Game]]
|JPN: {{#dateformat:1977-05-01|mdy}}
|¥{{FORMATNUM:15000}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Family Computer|Family Computer (Famicom/FC)]]<br>[[Special:MyLanguage/Consoles:Nintendo/Family Computer|Nintendo Entertainment System (NES)]]
|JPN: {{#dateformat:1983-07-15|mdy}}<br>NA: {{#dateformat:1985-10-18|mdy}}<br>EU: {{#dateformat:1986-09-01|mdy}}
|¥{{FORMATNUM:14800}}<br>${{FORMATNUM:179.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Super Famicom|Super Famicom (SFC)]]<br>[[Special:MyLanguage/Consoles:Nintendo/Super Famicom|Super Nintendo Entertainment System (SNES)]]
|JPN: {{#dateformat:1990-11-21|mdy}}<br>NA: {{#dateformat:1991-08-23|mdy}}<br>EU: {{#dateformat:1992-04-11|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:199.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo 64|Nintendo 64 (N64)]]
|JPN: {{#dateformat:1996-06-23|mdy}}<br>NA: {{#dateformat:1996-09-29|mdy}}<br>EU: {{#dateformat:1997-03-23|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:199.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/GameCube|GameCube (NGC or GC)]]
|JPN: {{#dateformat:2001-09-14|mdy}}<br>NA: {{#dateformat:2001-11-18|mdy}}<br>EU: {{#dateformat:2002-05-03|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:199.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Wii|Wii]]
|JPN: {{#dateformat:2006-12-02|mdy}}<br>NA: {{#dateformat:2006-11-19|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:249.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Wii U|Wii U]]
|JPN: {{#dateformat:2012-12-08|mdy}}<br>NA: {{#dateformat:2012-11-18|mdy}}<br>EU: {{#dateformat:2012-11-30|mdy}}
|¥{{FORMATNUM:26250}}<br>${{FORMATNUM:299.99}}
|}
== Handheld Consoles ==
{| class="wikitable"
|+
!Name
!Released
!Launch MSRP
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game & Watch|Game & Watch]]
|JPN: {{#dateformat:1980-04-28|mdy}}
|¥{{FORMATNUM:5800}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game Boy|Game Boy]]
|JPN: {{#dateformat:1989-04-21|mdy}}<br>NA: {{#dateformat:1989-07-31|mdy}}<br>EU: {{#dateformat:1990-09-28|mdy}}
|¥{{FORMATNUM:12500}}<br>${{FORMATNUM:89.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game Boy Color|Game Boy Color]]
|JPN: {{#dateformat:1998-10-21|mdy}}<br>NA: {{#dateformat:1998-11-18|mdy}}<br>EU: {{#dateformat:1998-11-23|mdy}}
|¥{{FORMATNUM:8900}}<br>${{FORMATNUM:79.95}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Game Boy Advance|Game Boy Advance]]
|JPN: {{#dateformat:2001-03-21|mdy}}<br>NA: {{#dateformat:2001-06-11|mdy}}<br>EU: {{#dateformat:2001-06-22|mdy}}
|¥{{FORMATNUM:9800}}<br>${{FORMATNUM:99.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo DS|Nintendo DS]]
|JPN: {{#dateformat:2004-12-02|mdy}}<br>NA: {{#dateformat:2004-11-21|mdy}}<br>EU: {{#dateformat:2005-03-11|mdy}}
|¥{{FORMATNUM:15000}}<br>${{FORMATNUM:149.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo 3DS|Nintendo 3DS]]
|JPN: {{#dateformat:2011-02-26|mdy}}<br>NA: {{#dateformat:2011-03-27|mdy}}<br>EU: {{#dateformat:2011-03-25|mdy}}
|¥{{FORMATNUM:25000}}<br>${{FORMATNUM:249.99}}
|-
|[[Special:MyLanguage/Consoles:Nintendo/Nintendo Switch|Nintendo Switch]]
|World: {{#dateformat:2017-03-03|mdy}}
|¥{{FORMATNUM:29980}}<br>${{FORMATNUM:299.99}}
|}
d6903f1430df9b787ba323142c68653789c32c17
Main Page/en
0
67
107
97
2024-05-16T02:02:08Z
FuzzyBot
5
Updating to match new version of source page
wikitext
text/x-wiki
<languages/>
<div aria-hidden="true" role="presentation">[[File:Oscr-render.png|{{dir|{{PAGELANGUAGE}}|left|right}}|thumb|320px|Render of [[HW5]]]]</div>
Welcome to the community wiki for the Open Source Cartridge Reader (OSCR)! This project represents a community-driven effort to provide an easy-to-build and easy-to-modify cartridge dumper. Its main purpose is to dump a video game's ROM and savefile to an SD card without the need for a PC.
=== Quick Links ===
* [[Special:MyLanguage/OSCR|OSCR Information]] - General information on the OSCR including details on past revisions.
* [[Special:MyLanguage/OSCR:Build Guide|Build Guide]] - A guide for building your own OSCR.
* [[Special:MyLanguage/OSCR:Usage Guide|Usage Guide]] - A guide for how to use the OSCR.
* [[Special:MyLanguage/Consoles|Console Manufacturers and Information]] - A list of console manufacturers and the consoles they've made. Includes technical details on consoles such as pin configuration, etc.
5d61e6b39d6d47e655e5aa1f500df6c7fb28841f